BOM not matching the Assembly

I have done everything known to me for this to happen but it just doesn’t want to budge. “Ctrl+q”, “Automatic Update BOM” in document settings nothing works. I would like to know how I can programmatically update the BOM to match the assembly right after I open the drawing. As it stands, if I remove or ad anything to the assembly file & I open the drawing, the BOM does not reflect those changes.

SolidworksApi macros
Answers 21
SF
SF 2012-01-05 Best Answer

Hi William,

what if you delete the BOM and insert a new one?

WC
WC 2012-01-05

I’ve not done that yet but it’s because I don’t know how. I’ll do some research, thanks.

SF
SF 2012-01-05

Hi william which version u r using?

If its swx2012 SP 1.0, then it hav some bugs which is yet to be fixed.

SF
SF 2012-01-05

You can follow these steps:

1.- select the actual BOM and hit delete

2.- go to INSERT then TABLES then BILL OF MATERIALS

WC
WC 2012-01-05

We are still on 2011 x64 SP3.0, but send me what you got; I could probably get it to work.

JS
JS 2012-01-05

Good afternoon William,

Did you have the Assembly open??

Or, check your settings, see the picture.

Later,

John

comment imagecomment image
WC
WC 2012-01-05

Yes I have that setting checked. I’ve tried both with & without the assembly open.

JS
JS 2012-01-05

Good afternoon William,

Somewhere you got a setting box that is either checked or un-checked, because ctrl Q is a force rebuild.

In the options tab under "External References"

Make sure the box is checked "Search File Locations for External References"

Later,

John

JS
JS 2012-01-05

Good afternoon William,

Another thing you may want to do next time is put this under the drawing forums, I see you have it stuck in API.

See:

https://forum.solidworks.com/tags#/?tags=posting

Later,

John

WC
WC 2012-01-05

I’m trying to do this via vb.net using the API.

JS
JS 2012-01-05

Good afternoon WIlliam,

My bad, I'm the one with egg on my face, sorry. 

Later,

John

FV
FV 2012-01-05

William, what type of BOM are you using?

WC
WC 2012-01-05

I THINK it's an excel driven BOM but I'm not sure, how do I find out?

SF
SF 2012-01-05

William,

Can I know what is VB.NET and API?

Thanks

WC
WC 2012-01-05

Is this a trick question?.. vb.net is a programming language provided by Microsoft, I’m using the express version (it’s free) & the API, abbreviation for Application Programming Interface, it’s basically a open door to the commands that a specific program uses to operate, in this case SolidWorks.

SF
SF 2012-01-05

Thanks William,

so VB is visual basic?

WC
WC 2012-01-05

Yes

JK
JK 2012-01-05

Just a thought,

Chack to see if the option, 'Keep Missing Items' is unchecked in the bom properties.

DG
DG 2012-01-06

William,

Can you share some files to do the test as what's happening on your side.

WC
WC 2012-01-06

Sorry for the late reply, I have no code yet, I always like to know what SolidWorks is doing then go from there, since I can’t get it to work using the GUI, I haven’t started coding. I think that I will let this one alone for a while until I have plenty of time to work on it. Thanks for the help.

JB
JB 2012-01-06

Covering the obvious: is your bom set to display the same configuration as the assembly you're adding the parts to?  It's possible that your new parts are automatically suppressed in the configuraiton that your BOM is linked to.

J