Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
How can I find the real WTPart relationship of the drawing part of an EPM document through a reference? I am obtaining the EPMReferenceLink ID of the data with the Drawing Reference through the REST API, but I don't know what to do next. Normally, I directly capture the WTPart relationships via PartDocAssociations using the EPMDocument ID, but I get multiple WTParts, and for some parts, I cannot select the actual part. Can you help me with this?
Solved! Go to Solution.
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.
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.