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

API for operated On type allocated parts?

kvsmanyam
4-Participant

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.

5 REPLIES 5

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

Did you ever find a solution for this? I'm in the same situation. Still getting same error message.

Hi @MG_10349901 

What error message are you talking about? 

You should show what is your issue. 

PetrH

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());
}
}

 

kvsmanyam
4-Participant
(To:HelesicPetr)

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 ?

Announcements