Skip to main content
12-Amethyst
September 29, 2022
Question

How to programatically get BOM for Creo assembly from Windchill with correct quantity

  • September 29, 2022
  • 3 replies
  • 3228 views

Hi,

I need to export Creo assembly multilevel BOM from Windchill programmatically. I checked IE task Query-Tree and REST Call PTC.CADDocumentMgmt.GetStructure. Both produce correct multilevel BOM, but the same Creo components in BOM are not merged (per level), so the same Creo components are listed multiple times and all quantities are equal to 1. 

On the other hand, running Query-Tree on WTPart does produce correct quantities in multilevel BOM.

In both cases I run an equally structured IE task, the only difference was Type. Do I miss some parameter in IE task to produce quantity for EPM Document or is not possible at all?

Any idea is very welcome.

Thanks.

 

3 replies

avillanueva
23-Emerald I
23-Emerald I
September 29, 2022

I cannot speak for REST api but in UI there the default it to separate uses. There is a action to Merge Uses. There might be something similar in API.

avillanueva_0-1664457923466.png

 

12-Amethyst
September 29, 2022

I know you can do that in UI, but have no clue, how UI function works. It could also be some JS code, doing it locally in browser.

17-Peridot
September 29, 2022

Does your QueryBuilder report show the Uses data correctly? I ask because it is possible to run a QB report programmatically.

 

12-Amethyst
September 30, 2022

Report is an interesting idea. I tried to build a report template for it, but I was unable to add EPMMemberLink type to Tables and Joins tab.

So, I was stuck at the beginning.

Marco Tosin
21-Topaz I
21-Topaz I
September 30, 2022
12-Amethyst
September 30, 2022

Thanks for answer. I'm aware of these documents, I checked them before writing the reply here. I didn't find a similar solution there.

BTW, links to "portal.ptcuser.org" are no longer valid.

I managed to add EPMMemberLink to report template (EPMMemberLink is internal name, and it is not shown by default, display name is EPM Documents Uses Link), but I'm not proficient enough in Reports to generate multilevel BOM table. And it is a strong chance that Merge Uses will not be possible at all.