Showing results for 
Search instead for 
Did you mean: 

Relation name and types of secondary

Good afternoon,


Is there a way to visualise the relation type an Item has with one of its descendants? I am trying to figure out the relation name and its type of an item revision with its BomView Revision. 


Item Revision --(1)--> BOMView Revision


What is the name of  (1)? Type of (1)?


Any way to get this information with the Rich Client visually and directly?


Programatically speaking; Is there a general way to get all the relations of an object with its descendants by calling expandGRMRelationsForPrimary and secondary? what filter do I have to set up in the preference to get all of them?


Thank you.


Re: Relation name and types of secondary

Solution Partner Honored Contributor Solution Partner Honored Contributor
Solution Partner Honored Contributor
By selecting the ItemRevision and then the Details tab, you can review the Relation column to see the name. Visually, this can be done with Impact Analysis, Where Referenced. But you have to right-click, properties for each of the objects and the screen can get a little crowded and hard to navigate.

As for code, you can ask Mark Hoover for his "Who's Tag" code that he demonstrated several years ago. You'll have to solve the captcha on website to reveal the latest email address.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11 | SW 2016 | Creo 4 | TcUA 11.4
Evaluating: AW 3.4

Re: Relation name and types of secondary

Solution Partner Legend Solution Partner Legend
Solution Partner Legend
As per doc: to get all the related objects in expandGRMRelationsForPrimary the input should be empty (empty string or an empty array depending upon data type). But input has to be provided, otherwise it throws error.

Re: Relation name and types of secondary


Thanks for your guidance.


Inspecting the item I find the relation type (when using real names): structure_revisions. Also its name: BOMView Revision.

TCUntitled.pngWith this information in hand, I expand the relation by calling:[0].otherSideObjectTypes = "BOMView Revision";[0].relationTypeName = "structure_revisions";

dmserv.expandGRMRelationsForPrimary(parentModeloObject, pref);

This should 'theoretically speaking' expand the relation and return the relation to me but, due to some unknow reasons it does not.
Error Msg.: The relation type name is invalid.

(And yes, I also updated de policies)


There is, in fact, an alternative way to getting the relationship, by inspecting the Model Object properties and selecting the values under the name of  "structure_revisions". This does indeed work.