TeamcenterKnowledge

Configuration utilities > Business Modeler IDE

get_key_string

Gets the multifield key value of an item instance as a string containing property names and values. This utility can be run on the Item business object or any of its children. Multifield keys are identifiers assigned to each object to ensure their uniqueness in the database. If the -item or -key argument input corresponds to more than one item, the key values for each of the items found is displayed. If the -key argument is used, partial keys are allowed. For example, if the key for an item is defined as item_id,prop1,prop2, inputs such as -key=item_id=123456,prop1=abcd are allowed, which may result in multiple items being found and displayed. To use the -item argument to get key values for an item, use the following command: Copy get_key_string -item=item-ID The results are displayed as: Copy Item Type is business-object-name, Key String is property1=property1-value,property2=property2-value,etc If other properties are added to the multifield key definition for an item business object, they are displayed separated by commas. For example, if the item_id and object_type properties comprise the multifield key for a custom item business object named T5_MyItem, the output of the command is: Copy Item Type is T5_MyItem, Key String is item_id=000016, object_type=T5_MyItem To use the -key argument to get the business object type for an item, use the following command: Copy get_key_string -key=property=property-value The results are displayed as: Copy Item Type is business-object-name, Key String is property=property-value Note There are other utilities that you can use to work with keys. Use the get_key_definition utility to get the key definition for a business object type, and use the mfk_update utility to update multifield key definitions in the key table in the database. To change the delimiters used in the input for the get_key_string utility, create the TC_KEY_STRING_DELIMITER_VALUES preference. For more information, see the Teamcenter Environment Variables. For more information, see Analyzing multifield keys in BMIDE for Data Model Design. Syntax get_key_string -item=business-object-item-ID -key=key-string [-h] Arguments -item Specifies the ID of items for which key values are to be displayed. -key Specifies the key value of items for which item types are to be displayed. -h Displays help for this utility. Environment As specified in Setting up a Teamcenter command-line environment. Files As specified in Log files produced by Teamcenter. Restrictions None. Examples To get the values of the multifield key properties on an Item business object instance whose item ID is 000016: Copy get_key_string -item=000016 The results are displayed as follows: Copy Item Type is Item, Key String is item_id=000016,object_type=Item To get the values of the multifield key properties on an instance of a custom item business object (T5_MyItem) whose item ID is 000019: Copy get_key_string -item=000019 The results are displayed as follows: Copy Item Type is T5_MyItem, Key String is item_id=000019,object_type=T5_MyItem To get the item type of an instance whose key is item_id=000016: Copy get_key_string -key=item_id=000016 The results are displayed as follows: Copy Item Type is Item, Key String is item_id=000016 Related Topics BMIDE for Data Model Design

Source: https://docs.sw.siemens.com/documentation/external/PL20251212545240207/en-US/tc_help/utilities_reference/coz1737253683897/avc1737253684501/xid381130.html · retrieved Fri Jul 31 2026 00:00:00 GMT+0000 (Coordinated Universal Time)