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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

What is type of link/association between a wtpart assembly and its constituent child wtpart? I am trying to generate a report to identify a set of Parts and their respective parent wtpart. Any thoughts?

PrabhuVakel
1-Visitor

What is type of link/association between a wtpart assembly and its constituent child wtpart? I am trying to generate a report to identify a set of Parts and their respective parent wtpart. Any thoughts?

Hi,

 

Could anyone let me know the type of association between a WTPart assembly and its component wtpart?

I am looking to create a report using Report manager where i have a set of WTPart numbers and whose parent WTPart I am trying to identify.

 

Thanks,

Prabhu Vakel

ACCEPTED SOLUTION

Accepted Solutions

"I am looking to create a report using Report manager where i have a set of WTPart numbers and whose parent WTPart I am trying to identify."

You want to join WTPart to WTPartMaster using the WTPartUsageLink where the WTPart Number is a string parameter that a user can enter, and the result includes the Part Number and Part Name of the WTPartMaster, as well as any other information you might want, like Chile Part Name and Number, Context Name and/or Folder Path of either the WTPart child or the WTPartMaster parent.

Remember that a usagelink is a version to master relationship, so you will not get a link to any particular parent version this way. If you want a navigable link to all versions of the parent, then you have to additoinally join a WTPart2 to the WTPartMaster using the Master Reference (I think that is the name, you just have to look at the link objects and pick the one that looks like a master reference). At that point you will get all iterations of the parent version unless you filter by Latest Iteration = 1 for that parent part. But even then you get all versions. If you want the latest version of the parent, then you have to do a subselect of the parent part to get the one version of the parent with the MAX value for VersionSortID. There have been examples of that kind of subselect for documents and parts on forums, and if you end up needing that then I can post something here. Of course, if you just need the parent number then all of these extra set up is unnecessary.

Al Anderson

View solution in original post

5 REPLIES 5

Check this WHC link.

Hope that helps.

Regards
~Syed

BenPerry
15-Moonstone
(To:PrabhuVakel)

wt.part.WTPartUsageLink

"I am looking to create a report using Report manager where i have a set of WTPart numbers and whose parent WTPart I am trying to identify."

You want to join WTPart to WTPartMaster using the WTPartUsageLink where the WTPart Number is a string parameter that a user can enter, and the result includes the Part Number and Part Name of the WTPartMaster, as well as any other information you might want, like Chile Part Name and Number, Context Name and/or Folder Path of either the WTPart child or the WTPartMaster parent.

Remember that a usagelink is a version to master relationship, so you will not get a link to any particular parent version this way. If you want a navigable link to all versions of the parent, then you have to additoinally join a WTPart2 to the WTPartMaster using the Master Reference (I think that is the name, you just have to look at the link objects and pick the one that looks like a master reference). At that point you will get all iterations of the parent version unless you filter by Latest Iteration = 1 for that parent part. But even then you get all versions. If you want the latest version of the parent, then you have to do a subselect of the parent part to get the one version of the parent with the MAX value for VersionSortID. There have been examples of that kind of subselect for documents and parts on forums, and if you end up needing that then I can post something here. Of course, if you just need the parent number then all of these extra set up is unnecessary.

Al Anderson

Hi Albert,

Thanks for your help.

It would really be informative if you can share with us the link to any of the forums discussing such topics.

Appreciate your help.

Regards,

Prabhu Vakel

LoriSood
22-Sapphire III
(To:PrabhuVakel)

Prabhu,

Did the above responses get you what you needed? If so, can you please mark the thread as answered?

Thanks,

Lori

Announcements


Top Tags