Message 1 of 4

Not applicable
06-22-2021
10:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using python?
try:
app = adsk.core.Application.get()
ui = app.userInterface
doc = app.activeDocument
partName = doc.name
print(partName)
This gives me the part name that I am currently working on. I am looking for a way to pull the name of the parent folder its stored in, as well as any parent folders up to the main project folder it resides in.
Project Folder Name
--Sub Folder Name
----Sub Folder Name 2
------Sub Folder Name 3
--------Part File Name ( I can get this, but is there a way to pull the names of all the folders above the part level to store in variables? )
Solved! Go to Solution.