Hello, You find the real WTPart relationship of the drawing part of an EPM document through a reference, you can follow these steps:
Retrieve EPMReferenceLink:
You already have the EPMReferenceLink ID. Use this ID to fetch the related EPMDocument.
Identify the Drawing Part:
Use the EPMReferenceLink to identify the drawing part. This link typically connects the drawing to the model.
Fetch WTPart Relationships:
Use the PartDocAssociations to fetch the WTPart relationships. This will give you a list of WTParts associated with the EPMDocument.
Filter WTParts:
To filter and identify the actual WTPart, you can use attributes like BUILD_TYPE to distinguish between different types of links (e.g., Owner, Contributing Image, etc.)
Step-by-Step Process
Fetch EPMDocument Using EPMReferenceLink:
GET /Windchill/servlet/odata/EPMDocumentMgmt/EPMDocuments('<EPMReferenceLink_ID>')
Identify the Drawing Part:
Use the response to identify the drawing part linked to the EPMDocument.
Fetch WTPart Relationships:
GET /Windchill/servlet/odata/CADDocumentMgmt/CADDocuments('<EPMDocument_ID>')/PartDocAssociationsFilter WTParts:
Use the BUILD_TYPE attribute to filter the WTParts and identify the actual part you need.
Hope that helps.