View Full Version : getting a BOM via SQL queries?

11-29-2007, 01:28 AM

I'm curious about the following.
For a very specific pricing tool in our company, I got the question if it is possible to get the BOM list of any 3D assembly by doing some SQL queries on the Workmanager database.
I know that I can easily query what children an assembly has by looking up CHILD_ELEMENT in wm_ele_links. But I cannot see how many of these children there are in the assembly. I also noticed that Modelmanager can give me a BOM without using Modeling, but Design Management can't.
Is there any info about the numbers of sub-parts in an assembly in the database, or does Modelmanager look into the 3D-files of the assies to know how many instances of each model there are in a certain assembly??? If so, making a BOM with SQL queries is not an option....


12-06-2007, 07:02 AM
Hi jkramer

1. I think that you must work into BOM(links between masterdata) and not into Assembly structure(links between cad parts and cad groups).

2. To integrate different application,if your "pricing tool" can comunicate with CoCreate Web Service you can use getStructure Method,and if you need some more custom you can create your web service method that return bom table as you need.

3. WMStructure class is usefull to create different kinds of bom table.Use this class inside your web method.You can also create an action into Bom Editor to create a BOM report into text file as you like.

4. If you use Work Manager you can create a macro STRUCTURE_OPEN(see help) that use logical table to specify table returned.Create a text file and pass it to External Application.WMStructure Class reproduce WorkManager STRUCTURE funcionality.

5.Model Manager User Interface can create many kind of bom report, so you can create fle to pass to External Application.

6.Using SQL is too hard for this job


12-10-2007, 11:19 AM
You can use the model assembly structure but it is not easy. If the assembly structure was saved by Model Manager, you can use the quantity values on the link to find out the share counts.

If the assembly structure was save from DDM then it is much more difficult. Model Manager gets the model files then calls the pb_pub.exe in the installation and coutns the children from its output.

You will have to do your own calculations for total quantities and this also not easy.

12-10-2007, 10:12 PM

thanks for the answers!
Kind regards,