Hi all,

I was trying to sketch out a batch process...

python Code:
    import rhinoscriptsyntax as rs
     
    def BatchSketch():
        files=rs.OpenFileNames("BatchProcess","Rhino files|*.3dm||")
        if not files: return
       
        for file in files:
            file='"'+file+'"'
            rs.Command("_-Open "+file)
            #The following works:
            rs.Command("_Line 0 10,0,0")
            #But this doesn't:
            #rs.AddLine([0,0,0],[10,0,0]) #or any other add geometry method
            rs.Command("_-Save _Enter")
    BatchSketch()

Can anyone tell me why the rs methods don't work in this case? I get a message that it is unable to add the geometry to the document. It seems that it's not accepting the current document as the active document if I step into the method...

--Mitch