Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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 ?
Solved! Go to Solution.
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.
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.
Yeah but it takes 5 mins to check quantity of 70k documents. I need an alternative instead of calculating quantity recursively.
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.
Hi @d_graham and @AP_10343008
I can confirm that I've never found any function that work enough fast for huge assemblies.
Always you need to go throw the BOM recursively and count the component count..
PetrH
Yep.
And even if there were a “function” the info still is not stored in the dB so it still needs to be calculated.
It just the way Windchill is. 🤷♂️😂
Thanks for the confirmation
As mentioned in this document thingworx navigate 9.4, can we expect consolidated quantity from next version of navigate or next version of windchill ?
Hi @AP_10343008
If PTC writes "in the future" be sure it takes several years 😄
nice example is filename length in Creo :D.
PetrH
Okay Thanks