Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
I'm looking for an API to get all the WTChangeReview objects from a WTPart.
as shown.
Solved! Go to Solution.
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
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);//
PetrH
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
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);//
PetrH