Hello:
I'd like to create a macro that I can run from within an assembly that will loop through each BOM item and add the quantity req'd to a custom property within the component. I'm very familiar with VBA from Office, but I'm new to it with respect to Inventor so I'm pretty fuzzy with object titles and options. Can someone assist with the coding?
Here's an outline of what I'd like to do:
Execute Macro from within Assembly file
For Each BOM Item to # of BOM Items
If Vendor = "Make" then
Set Component Custom Property "Qty_Reqd" = Total Qty from BOM
Endif
Next BOM Item
Can someone help and/or Is there an easier way?
Thanks!!
Solved! Go to Solution.
Solved by MegaJerk. Go to Solution.
Solved by MegaJerk. Go to Solution.
Do you mean - have it go through the component parts of the top level assembly without going through any of the sub-assemblies or their component parts?
moreso that if the top level assembly contains multiple instances of sub-assemblies "A" & "B" and parts "C" & "D"
it would only count these and not the items within "A" & "B".
Thanks.
Take code from here it is working perfect
http://forums.autodesk.com/t5/Inventor-Customization/Qty-in-bom/m-p/4618825#M47203