Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
How can I generate report for CAD to Part structure comparison with sql or any other query ?
I know which tables are involved like PartUsesOccurrence, EPMBuildHistory, EPMDocument and EPMDocumentMaster, WTPart, WTPart Master but do not know how they are linked together
Solved! Go to Solution.
partUsesoccurences holds info on the occurrences (generally reference designator /location [geometry]), this is needed particularly when we have usageLinks with Quantity > 1 and unit equal each , like a car with 4 wheels , we can have one Usage like with 4 ref designators to have 4 occurrences to identify each wheel
again I'm more a windchill functionality guy , maybe someone with more knowledge in Creo/Windchill integration has more info on this
Not possible using OOTB Query builder :
1- It not support recursive calls
2- the structure resolving requires a config spec (filter) , not possible using QML
@AN_10714372 When you are looking at the 'gear' assembly, open the Actions menu:
I think you need to have an Owner link between the CAD assembly and the gear.
Do you have any query, either database or QML or any other for one level bom compare report ? Basically I need to know how those database tables are linked together
The issue is not on the link , the issue is on traversing the structure from BOM header to leaf .
just for parts the link between a parent part and a components is WTPartUsagelink this one has a role to parent WTPart and the other role to child
is WTPartMaster , in this case how you are going to resolve child WTPartMaster to WTParts, you need a filter (i.e. latest,baseline.....) there is no way to apply the filter using QML or SQL .
****************
The WTpart has a column called ida3masterreference that holds the ida2a2 of the WTPartmaster
The same applies for EPMDoc it has ida3masterreference with ida2a2 of the WTPartmaster
*****************
regarding Part structure , the link is WTPartUsageLink the has 2 roles one is parent WTPart IDA2A2 ,the other role is ida2a2 of the WTPartMaster of the child
EPMBuildHistory has two roles one is to WTPart, the other is to EPM
The links are like this, my question is still how to make this play recessively and resolve masters to iterations
thanks very much for your presentation @Fadel, I understand the logic you presented here.
The logic for traversing BOM header to leaf element has to go through multiple stages. That means once we get the first level we need to use the same logic to get the second level by changing the parent. Since we are supposed to select the latest child revisions always, so to traverse to next level we always take the latest revision of the children. Which then becomes the parent later.
From your logic above you have used epm build history to get the EPM documents from part but what is the significance of part uses occurrence table in this case? It only to get the build status and a few more attribute values or is it of more significance?
partUsesoccurences holds info on the occurrences (generally reference designator /location [geometry]), this is needed particularly when we have usageLinks with Quantity > 1 and unit equal each , like a car with 4 wheels , we can have one Usage like with 4 ref designators to have 4 occurrences to identify each wheel
again I'm more a windchill functionality guy , maybe someone with more knowledge in Creo/Windchill integration has more info on this
I could gather blow info internally :
Thanks again for your effort.
yes I know the above values.
CADSYNCHRONIZED is what tells us that the part is synchronized with cad occurrence
BUILDSTATUS: is the last column in the cad part structure comparision
there is another column PartUsesOccurrence.uniqueIdsourceIdentification somehow I am puzzled what it refers to because sometimes its referring to memberlink.uniqueLinkID.
The purpose of all of these questioning is that I know epm build history tells that what is the source CAD version for a particular part version that it is built from.
But at the same time I also understand that one CAD structure can be referenced to multiple parts structures Or multiple part structures can be derived from one CAD structure. And therefore multiple part occurrences can be derived from one CAD occurrence. Having said that I wanted to check whether the build that we do from cad to part is occurrence to occurrence build or just CAD to part build
you can look at https://www.ptc.com/en/support/article/CS332588 , it has some QML samples ,that you can improve to match requirement