Skip to main content
14-Alexandrite
August 2, 2024
Solved

Finding the Actual WTPart Relationship of an EPM Document's Drawing Part via Reference

  • August 2, 2024
  • 1 reply
  • 906 views

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?

Best answer by FT_11575036

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.

1 reply

12-Amethyst
August 2, 2024

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.