Skip to main content
Jul 17, 2023 8:39 PM UTC
Solved

how to fetch cad structure with Each component listed once with a consolidated total quantity

In getStructure API,  Number of cad doc occurrences repeated because of quantity of the component in the document structure. how to fetch cad structure with Each component is only listed once with a consolidated total quantity ?

d_grahamAnswer
Jul 18, 2023 12:35 PM UTC

@AP_10343008 

I don’t think there is an alternative.

The sum is not stored in the dB. It has to be calculated.

 

Ever notice how when opening the structure tab for EPMDocs or WTParts you might see a message stating it’s working. That’s because Windchill has to calculate the structure.

You need to not only calculate the structure but you need to sum quantity EVERYWHERE the components is used in the structure.


Others can weigh in on this but I don’t see another way to get the info you’re looking for.

 

 

9 replies

Jul 17, 2023 9:00 PM UTC

I wrote a utility to do what you’re inquiring about.

The only way I found to do it was to write my own code that sums the quantity for each occurrence (recursively) in the assembly.

 

That will definitely work.

Jul 18, 2023 11:52 AM UTC

Yeah but it takes 5 mins to check quantity of 70k documents. I need an alternative instead of calculating quantity recursively.

d_grahamAnswer
Jul 18, 2023 12:35 PM UTC

@AP_10343008 

I don’t think there is an alternative.

The sum is not stored in the dB. It has to be calculated.

 

Ever notice how when opening the structure tab for EPMDocs or WTParts you might see a message stating it’s working. That’s because Windchill has to calculate the structure.

You need to not only calculate the structure but you need to sum quantity EVERYWHERE the components is used in the structure.


Others can weigh in on this but I don’t see another way to get the info you’re looking for.