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!

BOM QUANTIY EXTRACTION

Status
Not open for further replies.

CADMiester

Computer
Apr 11, 2006
13
0
0
US
Does anyone have a macro to extract the quatity of parts in an assembly or from a bom and have it update the file properties?

Thanks.
 
Replies continue below

Recommended for you

CADMiester

If I understand you correctly. You could use Custom Properties for this issue? You can create new ones if required. Hope this helps.

Cheers,

Ralph Wright, CSWP
SolidWorks 2005, SP5.0
P4, 2.53Ghz
1.5 Gb RAM
ATI Fire GL8800 Card
Windows 2000 Pro
 
explain what you are doing please? I don't understand why you would want the info from the BOM QTY or assembly to update the file properties... besides what file properties do you want to update (assembly, part, drawing)?

Regards,

Scott Baugh, CSWP [pc2]
faq731-376
 
I assume he's already talking about custom properties. We have a custom property on our part files for quantity. It's linked to a note in the title block on our parts drawing template. I think CADmiester is looking for a macro that would read the BOM on an assembly drawing and update the custom property field with the quantity from the BOM. Of course, unless he is using no standard parts (nuts, bolts, etc.) and has no common parts across different jobs/machines/products, he'll probably want to be able to skip certain files. This should be an easy enough macro to write. I've already got one that accesses the text in the BOM, but it only reads it as text in a dumb table, by rows and columns. I'm not at work right now, but I would imagine that there's a way to find the part/subassembly file bound to a row of the BOM through the API.

Cadmiester, what is your familiarity with VBA? Would a good starting point and a few pointers get you to where you can figure it out, or are you needing a plug-and-play solution?

It sounds to me like you need this functionality for assemblies with more than a few parts. However, if I'm wrong and you only care about a few critical parts then faq559-1232 may be able to help you some.

Have a great day!
 
CADMiester - if you can read German as your handle suggests, go to I started with the code in item 05 and have built a tool that goes through our assemblies, counts parts, updates custom properties, and more. The sky is the limit with the SW API. We do not use drawing BOM's to get lists for projects, we always scan the model. Good luck!
 
Status
Not open for further replies.
Back
Top