Rhinodoc.Name and Rhinodoc.Path after which event?

Hello I’m trying to implement some functionality in a plugin that lets me save a 3dm file with a timestamp added to the filename.

I am kind of confused as to when a Rhinodoc loads all its properties.

I tried several events:

All of them supply the doc that is loaded and i can get Properties like dateLastEdited or Layers and actual Objects in the file. I need the fileName and the filePath Properties which are both null after those events fire.

My Question: After which loading event is the active Rhinodoc fully loaded so that i can acces Rhinodoc.Name and Rhinodoc.Path?

EDIT: i just recognized that the DocumentOpenEventArgs has a FileName Property, still need the filepath though.

Thanks in advance,

Hi @lando.schumpich,

DocumentOpenEventArgs does contain the full path to the file that was opened. Keep in mind that you can open files that are not 3dm files. In this case, RhinoDoc.Path and 'RhinoDoc.Name` will be null until the model is saved as a 3dm file.

However, if you do open a 3dm file, check the above document properties after the Open command ends, or in Command.EndCommand.

– Dale

Thanks a lot dale after the ‘Open’ command ends I can get filepath and name works like a charm.