Hi, i wrote a plugin in visual studio based on rhinocommon.

Did someone has an idea how to insert a *.3dm file into the actual model using rhinocommon and c#??


I thought it has to do with





Views: 476

Replies to This Discussion

Hi Johannes,

Rhino.Input.RhinoGet.GetFileName is really just a customized version of System.Windows.FormsOpenFileDialog. Thus, it just returns a string.

If you want to import a file, then just script Rhino's Import command using Rhino.RhinoApp.RunScript.

I've attached an example for you to review.

 -- Dale


Hi Dale,

thanks alot for the example. It works perfectly fine.

So RunScript gives us the safety that every command is working like Rhino.Command was doing it... Nice to have but i hope that we can get rid of command scripting.



Hi Johannes,

Command scripting might seem a little hokey. But in terms of file I/O, it really is the 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.

Hope this helps.

 -- Dale



© 2015   Created by McNeel Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service