Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exported BOM Contains Deleted Items

Status
Not open for further replies.

jwalz

Computer
Apr 22, 2003
10
0
0
US
I have written a macro that finds the BOM Table in a drawing and goes through all of the rows and columns and dumps the information out to a .CSV file for use externally. That part works great. The problem that I am running into now is when an engineer modifies the BOM through Solidworks and deletes line items. Even though when the BOM is displayed in the drawing it reflects the manual changes, when the export macro is run, it picks up all of the items that were originally a part of the BOM Table. I searched but could not find any sort of status indicator value or a method that would allow me to test to see if a BOM line item is "active" or not. Has anyone else run into this problem and can you make a suggestion on how to deal with it programatically?
Thank you,
Janet
 
Replies continue below

Recommended for you

jwalz,

I have been exporting BOMs from SolidWorks too, since I prefer external BOMs.

My optimal strategy for this is to insert the BOM into the drawing, and copy and paste out to Excel. All of my problems have come from playing around with the Control tab on the Bill of Materials Properties menu.

Row numbers follow assembly ordering. All other configurations are risky. SolidWorks has a bunch of ways to keep track of stuff that has been deleted from the design. This allows you to insert say a 1/4-20x3/4 cap screw which becomes item_42. Later on you can delete the screw, and SolidWorks can...

- delete item 42 from the BOM. The count will now be ...40, 41,43, etc. I have tried this feature out, and I do not think it is reliable.

- draw a line through item 42, showing it has been deleted. This works as long as you do not copy the data out to something that does not have strike-out fonts, such as a CSV file.

- set the quantity of item_42 to zero. I don't think the feature in SolidWorks is reliable, and you are going to get weird questions from people, especially if a vendor is asked to price quantity zero 1/4-20x3/4 cap screws.

SolidWorks is indeed keeping track of deleted items. I assume that if I re-insert the 1/4-20x3/4 cap screw into my design, item_42 will re-appear on the BOM.

This would all be very nice if it worked, and if there were not problem with exported data. If you let the row numbers follow assembly ordering, you control the item numbers on the BOM. I like to list things in order of assembly.

I suggest you play around with BOMs inserted onto the drawing. These control how the items are numbered on the assembly.

JHG
 
Any time I have had a problem with deleted items appearing in a BOM, it was solved by deleting the BOM and inserting a new one.

[bat]You don't fight destiny, no sir... and you don't eat crackers in the bed of your future![bat]
 
I appreciate the advice, but I want my engineers to be able to modify the BOM manually if there is a need. We actually have some parts with information that gets put into the BOM that is not needed in every case. Cutting and pasting the BOM manually into Excel does work, but is a cumbersome processes and is the reason that we are automating it with the script. I need to determine where Solidworks stores the information that determines whether or not the line item is displayed or has been deleted.
Thanks, Janet
 
TheTick,

If I delete and re-insert the BOM, I destroy its change history. This is completely unacceptable if I am trying to keep track of deleted items, or if someone is manually modifying the BOM.

Jwalz,

If my item numbers correspond to assembly ordering, then I can delete and re-insert BOMs whenever I feel like it. TheTick is correct on this point.

SolidWorks BOM system is very nice, but it is not completely reliable. You must be able to delete BOMs and re-insert them. Tracking deleted items is a bad idea. Manual modifications to the BOM is a bad idea, and not recommended by SolidWorks. Aside from its lack of stability, all it takes is one drafter to hit the wrong button, and you have lost your data.

Are the occasional modifications to the BOM that awkward? Why can you not have two different models identical except for the BOM entry? How about multiple configurations?

You should investigate controlling the BOM entry from a design table embedded in the part file. An Excel column headed with $PRP@DESCRIPTION controls the description entry in your BOM. This is often way more convenient than using the Properties menu, or the dialog box in the Configuration Manager.

JHG
 
I don't want to get your hopes up too high or play the good old "Just wait for the next release" game, but...

I have heard the BOM will get a major overhaul in SWX 2004. The only concrete info I have heard is that BOMs will no longer rely on Excel. Lets hope they also improve BOM manipulation tools (like sorting the BOM, editing BOM contents, and such).

Doesn't help you now, but I for one can hardly wait! The BOM is one of the poorest aspects of SWX IMO.
 
Status
Not open for further replies.
Back
Top