Python Script "Export BOM" Add Folder Name To Output

Python Script "Export BOM" Add Folder Name To Output

isocam
Collaborator Collaborator
437 Views
0 Replies
Message 1 of 1

Python Script "Export BOM" Add Folder Name To Output

isocam
Collaborator
Collaborator

Can anybody help?

 

Please see the attached Python script file (.py changed to .txt)

 

The outputted BOM file works fine.

 

However,

 

If you look down the script you will find the word "folderName"

 

Inside Fusion 360 I have a folder called "Purchased Parts". Inside this folder are a number of sub-folders.

 

For example: Bearings, Gearboxes, Fasteners, BIL Castors etc etc

 

Please see the attached picture.

 

All I want to do is to add the folderName, to the outputted BOM file ,if the part inserted into a Fusion 360 assembly is from a folder contained inside another folder called "Purchased Parts".

 

So, for example, if the Fusion 360 assembly contains a part, inserted from a folder called "Purchased Parts" > "BIL Castors", in this case "BILCW03BZPH100NYB", I want to add the folder name "BIL Castors" to the outputted BOM file. With any other part inserted into an assembly I do not want to output any folder name to the BOM.

 

Hope that the above makes sense!!!

 

Many thanks in advance!

 

Kind Regards

 

Darren

0 Likes
438 Views
0 Replies
Replies (0)