Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Jlink and Bom

pageld

New member
Hi all.

Is there a way to get the BOM out of Pro by using jlink. I can almost do it by getting all the parts
Code:
sessionObject.ListModels()

or getting all the parts in an assembly
Code:
sessionObject.ListModelsByType(ModelType.MDL_ASSEMBLY);
//and loop through all the assemblies to get each feature by type
assemblyObject.ListFeaturesByType(Boolean.FALSE, FeatureType.FEATTYPE_COMPONENT )


however, I just want the 1st level parts in each assembly. The second code example will get EVERY part under the assembly, including parts in other assemblies.

Any help?

Thanks,
Dave
 
I don't know how to do it in Jlink but in Pro/TOOLKI you would not recurse into assemblies in each visit action callback. I would look for some other ListFeatures* method on the assemblyObject.
 
I looked for a ListFeatures* method...which I can't find or doesn't exist.


However, what I did is export the BOM to a file then parse through it with java.


Any better ideas out there?
 

Sponsor

Articles From 3DCAD World

Back
Top