File Path from RhinoDoc.ActiveDoc.Path

Hi,

I’m trying to serialize data to the work space. When I call RhinoDoc.ActiveDoc.Path in RhinoDoc.EndSaveDocument or in RhinoDoc.BeginSaveDocument I get null for File. The same happens for RhinoDoc.EndOpenDocument when I try to deserialize. What am I doing wrong?

Karol,

Try using the Arguments within either method instead.

This works within the RhinoDoc_EndOpenDocument method:

RhinoApp.WriteLine("e.Filename: " + e.FileName);

This does not seem to work:

RhinoApp.WriteLine("ActiveDoc.Path: " + RhinoDoc.ActiveDoc.Path);

This has me confused as well a while ago. There is a difference between the Rhino document and files that are opened or saved. For 3dm files this difference is a bit vague, but for other file types, you can think of it this way: the file is opened and its contents are interpreted and added to the document. Conversely, when the document is saved its contents are written to file.

The presence of the Path property on the RhinoDoc can thus be quite confusing.

I though I can use ActiveDoc.Path, but still, jstevenson72 what you wrote is the alternative. Thanks for explanation menno, I found your topic regarding this path, all is clear.