Hi all,
I am trying to export STL files in rs.Command() with the following code:
curDir = rs.WorkingFolder()
folderDir = curDir+'/fragments/'
os.mkdir(folderDir)
stlSettings = ' _ExportFileAs=_Binary _ExportUnfinishedObjects=_No '
stlSettings += '_UseSimpleDialog=_No _UseSimpleParameters=_No _Enter _Enter'
fragName = 'frag1'
fragId = rs.ObjectsByLayer('frag1')
rs.SelectObject(fragId)
fileName = os.path.join(folderDir, fragName+'.stl')
rs.Command('_-Export '+fileName+stlSettings)
rs.UnselectAllObjects()
However, it does not store the STL file in the folder defined in folderDir but somewhere else. In the command history it says “Invalid Option” right before it states that the file was successfully saved at the wrong directory.
What seems to be the problem? I am using Rhino 7.8.21160.05002 for Mac.
Thanks,
Simon
2 posts - 2 participants