Rhino.RhinoDoc.ActiveDoc.Path Although ideally you wouldn’t use ActiveDoc but get a reference to the relevant document. The same is true (even more so) for ActiveCanvas.Document. ActiveCanvas may be null or disposed, and Document may be null as well. Furthermore Grasshopper on Windows may maintain a lot of documents at the same time, whereas Rhino for windows only ever has one.
You can get the document associated with any given component using the OnPingDocument() method. If this method returns null, the object is not associated with a document.
OK, so if I start Rhino from a batch file, and then let Rhino scan a folder full of meshes (say; “c:\jobs\meshes*.obj”) and save them into sub folders or with new filenames, and when done, then close down Rhino, how do I do that safely?
I would have another instance of Rhino running at the same time.