Get BOM Table in an Assembly

December 11th, 2009


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!

Jeff Sweeney

CSWE Engineering Data Specialist 3DVision Technologies

Tags: , ,

Loading Facebook Comments ...

One Response to “Get BOM Table in an Assembly”

  1. Mike Brainard says:

    Hi Jeff,
    I needed a quick solution for finding BOM tables in an assembly and came across your routine. Thanks, It work great!

    I typically scan the feature tree looking for components but that method fails in 2012sp2. For a short term fix I’m using BOM tables in assemblies which can be scanned.

    Thanks again,
    Mike

Leave a Reply

Follow
Get every new post delivered to your inbox
Join other followers
Powered By WPFruits.com
Bear