I am fairly new to rhino sdk and I am unable to figure out a simple step such as how to open an existing .3dm file from harddisk using C# plugin. 

Can someone guide me where can I find a sample code or relevant documentation regarding this. 

Please let me know if this is not the right forum to seek help on plugins. 

Tags: C#, Open file, Rhino, documentation, example, plugin

Views: 643

Replies to This Discussion

Hi Varun,

You can open a .3dm file by scripting Rhino's Open command using Rhino.RhinoApp.RunScript. See the attached sample command for an example.

When opening, importing, saving, or exporting from Rhino, scripting native Rhino commands is only way to go. You see, every file type you want to import or export potentially has a different set if arguments. Thus, it is not possible to write a generic function that will allow you to open/import/save all file types. Thus the requirement for command scripting.

Let me know if this helps.

 -- Dale

Attachments:
Thanks a lot Dale!!!! It took us a long time to figure out how to perform these operations..

It worked and now things look a lot easier to work with..
Hello Dale,

Is it possible to run a script from a background thread?

I have opened up a new discussion:
http://v5.rhino3d.com/forum/topics/run-a-script-from-a-background-t...

Thanks for your help!!!

No, neither Rhino nor RhinoScript is thread safe.

 -- Dale

RSS

Translate

© 2014   Created by McNeel Admin.

Badges  |  Report an Issue  |  Terms of Service