Skip to main content
13-Aquamarine
October 11, 2024
Solved

WTPart -> WhereUsed related

  • October 11, 2024
  • 2 replies
  • 991 views

I am using Windchill PDMLink Release 13.0 and Datecode with CPS 13.0.2.0

I have a requirement to get the list of latest parent parts in which a child Part is used . I am using below API call to get the list
QueryResult queryResult = StructHelper.service.navigateUsedByToIteration(part, true, new WhereUsedConfigSpec());

In addition to this , I also need to get list of parent Parts in which a child part is used as a Substitute Part
The navigation would be like this to[Part Usage Substitute].from[Part Usage].from

I wanted to know if there is any OOTB API which would help to get this data ?


Here are the errors that I faced
NA

Best answer by jbraga

Hello,

 

Given a WTPartUsageLink, you can use the API described in article CS372288. This API navigates the substitutes role on wt.part.WTPartSubstituteLink to get the substitute parts for the input usage link. Please let me know if you have any questions regarding it and if this works well for you.

 

Thanks,

Justin

2 replies

jbraga
jbraga21-Topaz IAnswer
21-Topaz I
November 6, 2024

Hello,

 

Given a WTPartUsageLink, you can use the API described in article CS372288. This API navigates the substitutes role on wt.part.WTPartSubstituteLink to get the substitute parts for the input usage link. Please let me know if you have any questions regarding it and if this works well for you.

 

Thanks,

Justin

Fadel
23-Emerald I
November 8, 2024

How about something like 

<Server>/Windchill/servlet/odata/ProdMgmt/Parts('OR:wt.part.WTPart:xxx')?$select=Identity&$expand=UsedBy($select=Name,Identity,FolderLocation,EndItem;$levels=1;$filter=Latest eq true) 

Buiꓘa