File Path for non .3dm files


#1

Greetings,
I am attempting to do some batch file management inside python.
I need to obtain the file path of the document which is currently open if it is not a .3dm file.

If I already have an open .stp file in Rhino how can I get the file path for that file. I can use:
scriptcontext.doc.Name
scriptcontext.doc.Path
to get the path or doc name for a .3dm file but with an open .stp nothing is returned.

Any assistance would be greatly appreciated.
Thanks,
5chmidt


(Dale Fugier) #2

The WorkingFolder method should get you the working path. Let me know if you find otherwise.


(Dale Fugier) #3

I mean, the WorkingFolder method should give you the path to where the non-3dm file was opened…


#4

Thanks Dale,
The WorkingFolder works great for getting the path of the folder in which the document is located. Is there any way to get the file name? I do not see anything in Rhino.ApplicationSettings.FileSettings for getting the filename.

Thanks,
5chmidt


(Dale Fugier) #5

Rhino does not maintain the names of non 3DM files that is opens. Opening a non 3DM file is basically just like importing, except into an empty document.