Solidworks Macros - Assembly properties in a BOM
Solidworks Macros - Assembly properties in a BOM
(OP)
I am hoping to get some assistance in a way to export properties from an assembly and its components into an excel spreadsheet. Saving the assembly BOM as an excel spreadsheet is not automated enough, since we need three columns that come from custom properties of the assembly.
These three columns will be repeated for every component line item that show the assembly number, name, and revision. The following columns will be the same ones we would otherwise get from the assembly BOM. I think a macro could be developed to do this. Any tips? Contract work possible as well.
I would like the assembly properties repeated in a table that has its BOM, so it will have to extract BOTH assembly properties as well as component properties
These three columns will be repeated for every component line item that show the assembly number, name, and revision. The following columns will be the same ones we would otherwise get from the assembly BOM. I think a macro could be developed to do this. Any tips? Contract work possible as well.
I would like the assembly properties repeated in a table that has its BOM, so it will have to extract BOTH assembly properties as well as component properties






RE: Solidworks Macros - Assembly properties in a BOM
This seems a bad approach. Assembly properties have nothing to do with its components. They are not part of BOM. Your components can be used in any assemblies if necessary.
If you really want to do it, you can use VB or VBA to extract them together.
Good luck!
Alex
RE: Solidworks Macros - Assembly properties in a BOM
The BOM I have had to generate were driven by the shop and the front office who want to do things in interesting ways. The other problem with SW BOMs is that the part/assy order is random. When you make changes and reissue a BOM, it is comparatively difficult to track changes when the parts are not in the same order. In addition, there is no provision for updating quantities when you have 2 or more main assemblies and no - our people don't do math.
Its not hard. Mine generates a master array, sorts it (so the order is the same every time), generates quantities, and reads a bunch of stuff from the properties in the main assembly to generate the header.
John
RE: Solidworks Macros - Assembly properties in a BOM
You need to educate your people to use math, that's what their brains are for. If they can't wrap their heads around the correct number needed then they need replaced or more education. A BOM should indicate how many parts are needed to make one of that assembly and no more. When you start multiplying it out, someone that is smart enough to know how to interpret a BOM correctly will be confused and pissed off when they spend twice the amount of time pulling parts for one assembly. Job orders should indicate how many main assemblies you need to make, not the BOM.
RE: Solidworks Macros - Assembly properties in a BOM
After reviewing your post, I think you need to explain a little better what it is you are trying to pull. Is it where each part is used or are you trying to show an indented bill of material?
RE: Solidworks Macros - Assembly properties in a BOM
I do not see anything wrong with SW BOM. SW is consistent with ASME standard. SW throws you a default order of items of BOM. It is up to you how to present the BOM.
Assembly properties are not part of their BOMs. As a matter of fact, assembly properties doe not belong to BOM in SW. If you are familiar with SW BOM object, it does not even contain assembly properties. In order to put them together, you have to manually pull them from two different objects in SW.
I hope this makes sense.
Alex
RE: Solidworks Macros - Assembly properties in a BOM
RE: Solidworks Macros - Assembly properties in a BOM
What is purpose of the spreadsheet? What are you going to do with it? Will this spreadsheet be "LIVE"? That is, if you revise components and/or assembly, do you want this spreadsheet updated?
You can have someone at your local area who is familiar with both VB and SW to export any information from SW to your database.
You may change your if you think about your purpose of this spreadsheet.
Alex
RE: Solidworks Macros - Assembly properties in a BOM
RE: Solidworks Macros - Assembly properties in a BOM
I try to disencourage you to do what you are trying to do. Depending on your purpose, there may be something existing already for you to use. You need to realize that any time you pump data out of SW to a spreadsheet, your data will be out of sync.
It won't be cheap as you want to do custom programming. Depends on the scope, you hire a consultant locally to it for you if you really want to do it.
Good Luck!
RE: Solidworks Macros - Assembly properties in a BOM
RE: Solidworks Macros - Assembly properties in a BOM
-handleman, CSWP (The new, easy test)
RE: Solidworks Macros - Assembly properties in a BOM
The primary advantage to writing your own code (and I have had to do it a number of times) is that you don't have to make this compromise (change in your life's values, actually). When you are dealing with systems that, for a lot of insane reasons will not be changed, your only other option is to rearrange things by hand.
Assuming guys out in the shop have to do math is just silly. Of course they can, you just open up a whole other can or worms when they make mistakes (and they will). I under stand that all too well. I would have never made it through CWRU without calculators and computers. I can't add either. I think the reason computers exist is so no one has to.
My code probably wouldn't do you much good since it is specific to what we do and besides its owned by my employeer. In a nut shell, it reads property values that have been filled via another macro and design tables. The macro then fills another Excell sheet that is blank except for the headers, column labels, etc. (a template), renames and saves the file and then throws control over to the excell program.
I thrashed around at the start of this project trying to find someone else to do it and finally had to figure out a way to do it myself. My guess is you will have to do the same thing.