cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Get WTChangeReview objects from WTPart

Manoj_Dokku4
13-Aquamarine

Get WTChangeReview objects from WTPart

I'm looking for an API to get all the WTChangeReview objects from a WTPart.

as shown.

 

Capture.PNG

 

@HelesicPetr 

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @Manoj_Dokku4 

This code search the Change Review links from object WTPart WTDocument CADDocument what ever you can link to the Change Review

 

WTPart eventPart = UtilWTPart.getPartLatestIteration("00000005171"); // custom method to seach WTPart by number 
ChangeableIfc changableObject = eventPart; 
String targetRole = "theChangeReview";
Class<ChangeReview> targetClass = ChangeReview.class;
Class<ChangeReviewItemLink> linkClass = ChangeReviewItemLink.class;
QueryResult resultObject = 

ChangeHelper2.service.getLatestChangeItem(changableObject, targetRole, targetClass, linkClass, false);// search for the linked Change reviews 

 

HelesicPetr_1-1678088933787.png

 

If you change false to true in the method then you will get directly Change Review objects instead of links

 

ChangeHelper2.service.getLatestChangeItem(changableObject, targetRole, targetClass, linkClass, ture);//

 

HelesicPetr_0-1678088862133.png

 

PetrH

View solution in original post

1 REPLY 1

Hi @Manoj_Dokku4 

This code search the Change Review links from object WTPart WTDocument CADDocument what ever you can link to the Change Review

 

WTPart eventPart = UtilWTPart.getPartLatestIteration("00000005171"); // custom method to seach WTPart by number 
ChangeableIfc changableObject = eventPart; 
String targetRole = "theChangeReview";
Class<ChangeReview> targetClass = ChangeReview.class;
Class<ChangeReviewItemLink> linkClass = ChangeReviewItemLink.class;
QueryResult resultObject = 

ChangeHelper2.service.getLatestChangeItem(changableObject, targetRole, targetClass, linkClass, false);// search for the linked Change reviews 

 

HelesicPetr_1-1678088933787.png

 

If you change false to true in the method then you will get directly Change Review objects instead of links

 

ChangeHelper2.service.getLatestChangeItem(changableObject, targetRole, targetClass, linkClass, ture);//

 

HelesicPetr_0-1678088862133.png

 

PetrH

Announcements

Top Tags