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

API to fetch MPMOperation based on part tag filter?

Contributor

API to fetch MPMOperation based on part tag filter?

I want to fetch operation based on part tag filter(Same as Edit filter functionality of process plan)? Is there any API to achieve this?

 

Thanks,

Jalpesh

 2018-10-09 14_27_25-Process Plan - P000004380, A.8 (Design) (Production) (TESTPROCESSPLAN3).png

 

 

 

1 REPLY 1

Re: API to fetch MPMOperation based on part tag filter?

Please refer below sample code:

ReferenceFactory referencefactory = new ReferenceFactory();
WTPart part = (WTPart)referencefactory.getReference("VR:wt.part.WTPart:xxx").getObject();
WTPartMaster partM = (WTPartMaster)part.getMaster();
QueryResult qrOpUsagelink = wt.fc.PersistenceHelper.manager.navigate(partM,"taggedBy",wt.objecttag.PartTagLink.class,true);
while(qrOpUsagelink != null && qrOpUsagelink.hasMoreElements()){
    MPMOperationUsageLink link1 =(MPMOperationUsageLink)qrOpUsagelink.nextElement();
    String op1 = link1.getOperationNumber();
}

 

Hope this helps.