API for operated On type allocated parts?
‎Jul 05, 2022
08:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Jul 05, 2022
08:12 PM
API for operated On type allocated parts?
As per this thread:
Will this work for operated On type allocated parts ?
PTC is suggesting MPMProcessPlanHelper.service.getPartsFromOperation and getOperatedPartsFromOperation and doesnt seem to work.
Please suggest.
Labels:
- Labels:
-
API
3 REPLIES 3
‎Jul 08, 2022
03:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Jul 08, 2022
03:28 AM
Hi @kvsmanyam
Yes it will. In my case it works pretty well.
You just need to put an operation that have some parts linked as operated on.
Also NCServerHolder should be correctly defined.
PetrH
‎Jul 11, 2022
04:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Jul 11, 2022
04:41 AM
Hi @kvsmanyam
Following example works
NavigationCriteria navCriteria = new NavigationCriteria();
List<LatestConfigSpec> configSpecList = new ArrayList<LatestConfigSpec>();
configSpecList.add(new LatestConfigSpec());
navCriteria.setConfigSpecs(configSpecList);
NCServerHolder holder = new NCServerHolder(null, navCriteria);
Collection result = MPMProcessPlanHelper.service.getLinksForOperatedOnParts(operation, holder);
for (Object o : result)
{
ObjectReference linkObject = (ObjectReference) o;
if (linkObject.getObject() instanceof MPMOperationToOperatedPartLink)
{
MPMOperationToOperatedPartLink oplink = (MPMOperationToOperatedPartLink) linkObject.getObject();
System.out.println(oplink.toString());
}
}
‎Aug 09, 2022
02:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
‎Aug 09, 2022
02:46 PM
I've tried this but didnt work for me. Any idea why we are passing null as first argumnent for NCServreHolder when we instantiate ? why cant we use NCServreHolder.getLatestConfigSpec() directly ?