Using VB.Net to calculate the cost of the parts in an assembly

Using VB.Net to calculate the cost of the parts in an assembly

Anonymous
Not applicable
659 Views
1 Reply
Message 1 of 2

Using VB.Net to calculate the cost of the parts in an assembly

Anonymous
Not applicable

I am trying to recurse through an assembly, extract the mass of each part, mutiply it by the unit cost of its material and then update the cost property for each part so this can be displayed in the BOM.  I can access the iProperties of the assembly but not the properties of the individual parts.  Any help will be appreciated.

 

Thanks.

0 Likes
660 Views
1 Reply
Reply (1)
Message 2 of 2

Vladimir.Ananyev
Alumni
Alumni

IMHO in your case it is better to use BOM object. From each row you get both reference to Component definition and component quantity. Inventor API help provides the good code sample that illustrates BOM API.  Search for title “Using the BOM APIs API Sample”.

To get only parts you may use BOMView “Parts Only”.


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

0 Likes