BOM

BOM

GosponZ
Collaborator Collaborator
561 Views
3 Replies
Message 1 of 4

BOM

GosponZ
Collaborator
Collaborator

I'm using this code to export bom and it is working good. But here is question. Is it possible to exclude purchased parts from bom?



fileName=ThisDoc.PathAndFileName(False)&".csv"
ThisBOM.Export("Parts Only", fileName&".csv", kTextFileCommaDelimitedFormat)

0 Likes
562 Views
3 Replies
Replies (3)
Message 2 of 4

adam.nagy
Autodesk Support
Autodesk Support

Hi,

 

You can either: 

a) export all the info yourself by iterating through the BOM

b) export it using Export() and then modify the created csv file

 

In either case you'd need to iterate through the BOM to find out which items are purchased.

 

Cheers, 



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 4

GosponZ
Collaborator
Collaborator

Hm..

by creating my parts i determne which parts are purchased and those parts i do not need to export in csv file since i'm using them for other purpose later. Just to save me a little bit of time i thought that is possible to add line of code just to exclude purchased parts which has designation in BOM structure .

0 Likes
Message 4 of 4

mslosar
Advisor
Advisor

There is an example of iterating through the BOM in the programming help file that comes with inventor.

 

It's under Samples>Assemblies>Bill of materials>Using the BOM APIs

 

Least, that's where it is in 2013.

 

As you loop through you should be able to check for the BOM type of a part

0 Likes