Skip to main content
7-Bedrock
December 13, 2022
Solved

Get WTPart from MPMProcessPlan

  • December 13, 2022
  • 1 reply
  • 1326 views

How can I get the associated WTPart from an MPMProcessPlan programmatically?

Best answer by HelesicPetr

Hi @asnoeckx 

 

The service is: 

QueryResult queryresult = MPMProcessPlanHelper.service.getWTParts(mpmProcesPlan);

PetrH 

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
December 14, 2022

Hi @asnoeckx 

 

The service is: 

QueryResult queryresult = MPMProcessPlanHelper.service.getWTParts(mpmProcesPlan);

PetrH 

asnoeckx7-BedrockAuthor
7-Bedrock
December 16, 2022

Thanks! This indeed gets me a long way, but if I am not mistaken, the query returns all versions of all related parts. Any chance I can find out the specific WTPart version linked to the plan?

 

HelesicPetr
22-Sapphire II
22-Sapphire II
December 16, 2022

Hi @asnoeckx 

 

The result contains all linked versions. So Your process plan is linked to iterations which are returned.

It does not mean that all versions of WTPart are returned. Only the linked one.

 

If you need specific version you need to filter it.

For example the latest revision/iteration.

 

PetrH