Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi friends,
I have a scenario, where BOM structure contains a part for ex: ABC 1.46 (As designed) . But the latest iteration of the part is ABC 1.5 ( As manufactured) . Basically this ABC part has 2 views. When i use the below API to query the top part
QueryResult links = wt.fc.PersistenceHelper.manager.navigate(validPart, wt.part.WTPartUsageLink.USES_ROLE,wt.part.WTPartUsageLink.class,false);
It always gives me latest iteration which is expected. That is, it is giving me ABC 1.5 ( As manufactured).
But the BOM structure has link to ABC 1.46 (As designed). Is it possible to get the exact part linked to top part instead of getting the latest part. ( Based on views) .
Solved! Go to Solution.
Hi @gmydoor-2
This API works as expected. It always gives you link to the Master object of WTPart and then the latest one.
You need to use and specify a NavigationCriteria that define what you will get
NavigationCriteria navCriteria = new NavigationCriteria();
List<LatestConfigSpec> configSpecList = new ArrayList<LatestConfigSpec>();
configSpecList.add(new LatestConfigSpec());
navCriteria.setConfigSpecs(configSpecList);
QueryResult query = WTPartHelper.service.getUsesWTParts(wtpart,navCriteria);
Example of configSpec
LatestConfigSpec
BaselineConfigSpec
WTPartConfigSpec
WTPartEffectivityConfigSpec
AsMaturedConfigSpec
ViewConfigSpec
and many others
you can combinate all configSpec in the array and it is solved one by one as is added to the array. Similar to Structure filter.
If the first config does not solve the specific iteration use next config, atc...
Hope this can help.
PetrH
Hi @gmydoor-2
This API works as expected. It always gives you link to the Master object of WTPart and then the latest one.
You need to use and specify a NavigationCriteria that define what you will get
NavigationCriteria navCriteria = new NavigationCriteria();
List<LatestConfigSpec> configSpecList = new ArrayList<LatestConfigSpec>();
configSpecList.add(new LatestConfigSpec());
navCriteria.setConfigSpecs(configSpecList);
QueryResult query = WTPartHelper.service.getUsesWTParts(wtpart,navCriteria);
Example of configSpec
LatestConfigSpec
BaselineConfigSpec
WTPartConfigSpec
WTPartEffectivityConfigSpec
AsMaturedConfigSpec
ViewConfigSpec
and many others
you can combinate all configSpec in the array and it is solved one by one as is added to the array. Similar to Structure filter.
If the first config does not solve the specific iteration use next config, atc...
Hope this can help.
PetrH
Thanks HelesicPetr. It worked with WTPartStandardConfigSpec.