Message 1 of 2
Python Script: Find Folders In Root Directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anybody help?
I have the following code. in a Fusion 360 Python script:
def ExportBomFile(BomFileName):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
design = adsk.fusion.Design.cast(app.activeProduct)
activeDocumentName = design.parentDocument.dataFile.name
component: adsk.fusion.Component
for idx, component in enumerate(list(design.allComponents)):
ParentFolderName = str(dataFileFullPath(component.parentDesign.parentDocument.dataFile))
FolderName = component.parentDesign.parentDocument.dataFile.parentFolder.name
Can anybody update the above script so that it includes folders that are located in the root directory as well?
Please see the attached picture.
Many thanks in advance!!
Darren