Hi im trying to batch insert 3dm models into a rhino file
I cant seem to get the handles of the newly created objects in rvb.

Views: 829

Replies to This Discussion

Actually, there are NO 3dm file input output methods supported by rhinoscript.methods that I can find.

It seems odd that there are a Plethora of commands that can be done in rhinoscript rvb.
But something as simple as importing a 3dm file isnt in there.

If you want to import or insert a block you need to use rhino.command(" -insert C:\...")
Which gets very messy indeed to bypass the dialogue box. Especially if there are spaces in your file path.

Hi Alex,

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 RhinoScript, then script either the -Open or the -Import command using Rhino.Command. To obtain the objects that were either created or modified by that command, use Rhino.LastCreatedObjects.

http://4.rhino3d.com/5/rhinoscript/selection_methods/lastcreatedobj...

 -- Dale

Thanks Dale, LastCreateObjects will do it.
It would be nice to have an option just for rhino.3dm files,
but as you say there are still lots of options even for rhino.3dm. from different units scale, size options etc.

Any way to suppress the dialogue? So it doesnt look messy? Other than to change the font color foreground and background to be the same? Noecho only stops some of it :-)


PS really appreciate all your work on scripting, and making rhino really great
thanks.

Instead of doing this: Call Rhino.Command("<command_script>") Do this: Call Rhino.Command("<command_script>", False) Check th

Cheers mate, thanks for that, I feel like a total nube.


I just had a look through all of your sample scripts on github. WOW .
The geometry wizard script, looks like it would be hilarius, like the notes in the top
'too much spare time

There are also a bunch of great tips and tricks here:

http://wiki.mcneel.com/developer/rhinoscript

 -- Dale

RSS

Translate

© 2018   Created by McNeel Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service