Create new rhino file and save it to a directory (RhinoCommon way)

I need to start rhino application from Rhino and save some data from current rhino file.
I want to Start rhino application from rhinocommon plugin and then save it in a given directory with some drawing data…

Is it possible.

How to open Rhino application from Rhinocommon plugin? and then take some point co-ordinates and do some work in the new rhino file and then save it in a given directory…
Any clue and advise will be a big help.

I’m not sure if you can open a new instance of Rhino from a plug-in, but you can use COM automation to start Rhino from a “normal” program. Maybe it can also be done from a plug-in.

An example of this is given here

The downside is that the instance of Rhino that is opened over COM can only be manipulated using scripting or by getting the plugin object.

BUT: it sounds like you want to write a new 3dm file. You don’t need a new Rhino instance for this: just do all the work inside one Rhino instance in your plug-in, and save the results to a new 3dm file using the File3dm class. We do it like this all the time and it works.

1 Like

Perhaps this project by dale is of use to you?

1 Like

Yes I mainly need to save data automated as new Rhino 3dm file… Many Thanks for the clue!

Many Thanks!

It seems these samples moved to: rhino-developer-samples/rhinocommon/cs/SampleCsAutomation at 7 · mcneel/rhino-developer-samples · GitHub

You can also use win32com with Python.
I do it all the time with AutoCAD (because Autodesk makes horrible softwares)