In SOLIDWORKS 2009 they introduced the idea of having a BOM in an assembly file. Cute and sweet, but no balloons? What good is a BOM table if you cannot connect the parts to their line items?
In SOLIDWORKS 2010, they stopped the maddness and gave us the ability to balloon our assemblies. (Hey the best way to speed up creating drawings is not not have to create them!)
Is it just me or shouldn’t the assembly balloons be spheres?! Wouldn’t that look cool?!
Now that we have the BOM table in the assembly, you are asking how to connect to the table with the API. It is a good question, there are many examples to get the BOM object when working in a drawing, they are always connected to a view…but there are no drawing views in assemblies!
You could have the user select the table before your code begins, but this little sample macro file finds the BOM table for you then shows how to read the table by printing the BOM in the immediate window.
Pffft….Come on SOLIDWORKS 2D balloons in a 3D model – hurts my eyes!