4.3.3.2.2.3. Additional Task: Attribute Mapping

Example: The " Description " field for the "Revision" item is to be changed, and the value " LINA" from the 3D model is to be used.

  1. To use attribute mapping, enable the key PdmOnCheckin_02.EXECUTE with the value _TC_HOOK_SERVICE.mapAttributes.

    [CreationOptions(is3d):include(CreationOptions)] 
    PdmOnCheckin_02.EXECUTE=_TC_HOOK_SERVICE.mapAttributes

  2. Create the following blocks and keys according to the desired object/reference to which the change should apply.

    [AttributeMapping(is3d)] 
    Attr_Content_04=TeamcenterAttributes_Item{ModelObject}>>revision_list{ModelObjectVector} 
    Attr_Section_04=TeamcenterAttributes_Item{ModelObject}>>revision_list{ModelObjectVector} 
    
    [TeamcenterAttributes_Item{ModelObject}>>revision_list{ModelObjectVector}]
    object_desc=?_FORMAT_0("<ATTR(english,LINA)>").value()

  3. To find out the real name used in Teamcenter for " Description," follow these steps:

    1. Select an item revision.

    2. Open the context menu and click View Properties.

      -> The Properties -> Item dialog box opens.

    3. Click the " Print object properties" button.

      -> The Print dialog box opens.

      If the real name is not displayed, enable it in the Print Format dialog box (accessed by clicking Set result format ).

  4. Add the key "object_desc " (which corresponds to the Real Name in Teamcenter) with the following value, which contains the desired 3Dfindit attribute (in this example, "LINA").

  5. Terminate the "pddlhost" process using "vbbhost" at the command line.

  6. Perform a new export.

    -> Now "Description " displays the value " LINA ":