cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping NX Attributes

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Does anyone have a working example of an attribute mapping file for Teamcenter and NX? As far as I can tell, I've followed the documentation almost exactly, but things aren't quite working as expected.

 

I'm trying to map attributes in NX 10.0.2 and Teamcenter 11.2.2 on a custom item type. For example, my custom item is AB4_Item and the IRM is AB4_ItemRevisionMaster. I'm mapping MY_ATTRIBUTE in NX to AB$_MyAttribute in Teamcenter, and I want the user to be able to modify the attribute within NX. In my mapping file, I have:

 

{ Dataset type="UGMASTER"
{ Item type="AB4_Item"
"MY_ATTRIBUTE" : ItemRevision.GRM(IMAN_master_form,AB4_ItemRevisionMaster).AB4_MyAttribute /master=cad /description="My Attribute"
}
}

The AB4_MyAttribute is not populated in the Viewer tab in the rich client. In NX, the attribute appears, but shows as a read-only database attribute.

 

What am I doing wrong?

7 REPLIES

Re: Mapping NX Attributes

You can configure mapping as 'test' in the begining ( Refer preference - TC_USE_TEST_ATTR_MAPPINGS ). This provides more information in syslog , if there is any problem in mapping.  That may help you in finding the problem.

Re: Mapping NX Attributes

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

A trick for figuring out the relationships is to show real property names in Teamcenter using TC_display_real_prop_name = 1 (default is 0 - show display name).

 

The master form is attached to the Item using IMAN_master_form relation.

Master.PNG

 

While the revision master form is attached to the Item Revision using IMAN_master_form_rev relation.

RevMaster.PNG

 

 


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Mapping NX Attributes

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

When trying to talk to the Item from NX you also need to set:

TC_NX_allow_attrsync_master_with_item=yes

 


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Mapping NX Attributes

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Thanks Randy, since I'm trying to map to the item revision master, I think the relation is where the problem is. But when I try:

 

"MY_ATTRIBUTE" : ItemRevision.GRM(IMAN_master_form_rev,AB4_ItemRevisionMaster).AB4_MyAttribute /master=cad /description="My Attribute"

I get an error message saying "The specified type IMAN_master_form_rev does not exist."

Re: Mapping NX Attributes

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor
Is that the NX syslog or the Teamcenter syslog? I've been using the test mappings, but I don't see anything in the NX syslog.

Re: Mapping NX Attributes

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Try short-hand notation:

https://docs.plm.automation.siemens.com/tdoc/nx/11.0.1/nx_help#uid:index_tcint:id1299760:id1299788:t...

 

MY_ATTRIBUTE : IRM.AB4_MyAttribute /master=cad /allow_null_value /description="My Attribute"

 

Note: I removed the quotes on the attribute name "MY_ATTRIBUTE" and added a switch "/allow_null_value".


Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: Mapping NX Attributes

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Reviewing the data model in the BMIDE revealed that the case defined in the BMIDE was different than the case in the mapping file; e.g., ab4_MyAttribute in the BMIDE and AB4_MyAttribute in the mapping file. Once I made them the same, the mapping worked correctly.

 

Thanks everyone for all your suggestions!