Wish Python rs.Import( fliename) rs.Insert(filename,options)


#1

Hi Steve
Can you add a new method rs.Insert(…) rs.Import(…) ?
Ciao Vittorio


#2

This is of interest to me. I’m just learning Rhino and the python functions but I can’t seem to figure how to import and select the contents of a IGS or STEP file in a script. Or maybe I just haven’t found it yet.
Tim


(Dale Fugier) #3

For inserting blocks the rhinoscriptsyntax has an InsertBlock method. See the Rhino.Python help for details.

For importing files, use rhinoscriptsyntax.Command, just like you would if you were using RhinoScript, and script the “-Import” command.


(Dale Fugier) #4

As each type of file, support by Rhino for opening or importing, has a different set of options, it not possible to write a single, generic file open function and hope to support all formats. Thus, if you want to open or import a file from a plug-in command, then simply script either Rhino’s Open or Import command using rhinoscriptsyntax.Command.