Skip to main content
1-Visitor
July 8, 2014
Solved

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?

  • July 8, 2014
  • 5 replies
  • 3320 views

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

Best answer by AL_ANDERSON

"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

5 replies

16-Pearl
July 8, 2014

Check this WHC link.

Hope that helps.

Regards
~Syed

BenPerry
15-Moonstone
July 8, 2014

wt.part.WTPartUsageLink

12-Amethyst
July 8, 2014

"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

1-Visitor
July 25, 2014

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

23-Emerald II
July 11, 2014

Prabhu,

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

Thanks,

Lori