TeamcenterKnowledge

Data sharing utilities

attribute_export

Queries for the objects that satisfy the conditions specified by condition property name/property value pairs, sets new values for the properties to be updated on the found objects, and exports the data to a TC XML file. You then must use the tcxml_import utility to import the TC XML file containing the updated values back into the database. Caution Using the bulk load feature (-bulk_load argument) of the tcxml_import utility to import a TC XML file requires the SITCONS_AUTH_KEY environment variable be set to a valid license key value. Due to the potential for data integrity issue if this feature is used improperly, you must meet specific criteria before you can obtain the required key from Siemens Support. For more information about loading bulk data, see Teamcenter Data Exchange. You can use these two utilities in conjunction to update the properties of numerous objects at once. The update process allows you to update one or more attributes of an object. When a specified object contains multiple attributes, only the specified attributes are exported and updated. For complex update operations, you can create an input XML file containing instructions on which objects to update and the new values to apply. The file is constructed as a series of UpdateSet entries; each entry must contain type, where, and update components. Before performing lengthy update operations, you can use the utility to determine the number of objects affected by a specified update operation. For more information about the bulk update process, including instructions on creating the input file, examples of different update operations, performance statistics, and methods for managing the operation’s duration, see Teamcenter Administration. Syntax attribute_export -u=user-ID {-p=password | -pf=password-file} [-g=group] {-inputfile=path-to-input-XML-file | -type=type-name -cond_prop=property-name -cond_value=value-name -update_prop=property-name -update_value=property-value} [-cond_operator=operator] [performSchemaValidation] [-queryonly] [-log= log-file-path] [-outdir=output-XML-file-directory] [-batchsize=number-of-objects-to-update-per-batch] [-islandsize=number-of-objects-to-update-per-island] [-untransformed] [-uidfile] [-h] Arguments -u Specifies the user ID. The user must have administrative privileges. -p Specifies the user's password. This argument is mutually exclusive with the -pf argument. -pf Specifies the password file. For more information about managing password files, see Manage password files. This argument is mutually exclusive with the -p argument. -g Specifies the group associated with the user. The group value must be dba to run this utility. -inputfile Specifies the full path to the input XML file containing instructions on which objects to update and the new values to apply. The file is constructed as a series of UpdateSet entries; each entry must contain type, where, and update components. For more information about creating the input file, see Teamcenter Administration. Use the input file for complex updates. (For simpler instances, you can use the following arguments.) You must use either this argument, or the -type, -cond_prop, -cond_value, -update_prop and -update_value arguments. -type Specifies the type of objects to be updated. For example, item or dataset or StructureContext, and so on. This argument accepts a single value, which must be a valid Teamcenter object. Use multiple instances of this argument to specify multiple object types. You must either use this argument in conjunction with the -cond_prop, -cond_value, -update_prop and -update_value arguments, or use the -inputfile argument. -cond_prop Specifies the name of the property to be queried for and updated during export. This argument accepts multiple values in a comma-separated list. Each value must be a valid property on a Teamcenter object. For example: -cond_prop=object_name, last_mod_date You can use multiple instances of this argument. Each instance of this argument must be paired with the -cond_value argument. You must either use this argument in conjunction with the -type, -cond_value, -update_prop and -update_value arguments, or use the -inputfile argument. -cond_value Specifies the new value for the property specified by the -cond_prop argument. This argument accepts multiple values in a comma-separated list. Each value must be a valid property on a Teamcenter object. For example: -cond_value=TextData_es_ES, ”01-DEC-2011 00:00” You can use multiple instances of this argument. Each instance of this argument must be paired with the -cond_value argument. You must either use this argument in conjunction with the -type, -cond_prop, -update_prop and -update_value arguments, or use the -inputfile argument. -update_prop Specifies the internal name of the property to be updated (as opposed to the display name). For example object_desc, char VLA, and so on. This argument accepts multiple values in a comma-separated list. Each value must be a valid property on a Teamcenter object. For example: -update_prop=object_name, object_desc You can use multiple instances of this argument. Each instance of this argument should be paired with the -update_value argument. You must either use this argument in conjunction with the -type, -cond_prop, -cond_value, and -update_value arguments, or use the -inputfile argument. -update_value Specifies the new value for the property specified by the -update_prop argument. This argument accepts multiple values in a comma-separate list. For example: -update_value=folder, ”Home folder” You can use multiple instances of this argument. Each instance of this argument must be paired with the -update_prod argument. You must either use this argument in conjunction with the -type, -cond_prop, -cond_value, and -update_prop arguments, or use the -inputfile argument. -cond_operator Specifies the operator to be used with the condition arguments. Valid operations are: equal, not equal, greater than, greater than and equal, less than, less than and equal. When setting the value for this argument in the command window, the format for these operations are: EQ, NE, GT, GE, LT, and LE. Note When setting the value for this argument in the input file, you can use the above format, or the following characters: =, !=, >, >=, <, <=. This argument is optional and is only valid when used with, and placed after, the -cond_prop and -cond_value arguments. For example: -cond_prop=object_name -cond_value=”My obj #1” -cond_prop=”last_mod_date” -cond_value=”01-DEC-2011 00:00” -cond_operator=”LE” -cond_prop=”last_mod_date” -cond_value=”01-DEC-2010 00:00” -cond_operator=”GE” -performSchemaValidation Enables schema validation of the XML input file. -queryonly Outputs the number of target objects affected by the specified update parameters to a log file. If the number of objects is less than 100, the object UIDs are included in the log file. When you specify this switch, the utility does not perform the update, it merely reports the number of affected objects. Use this switch in conjunction with either the input file or the condition and update arguments to determine how many objects are affected by specified update operation. You can use the resulting information to determine batch size, and to estimate the duration of the update operation. For more information about update duration, see Teamcenter Administration. -log Specifies the path to the log file. By default, this is the current directory. -outdir Specifies the directory to which the TC XML file is generated. The file name is automatically generated, using the following naming convention: BulkAttrOut_1.xml, BulkAttrOut_2.xml, BulkAttrOut_3.xml This argument is optional. If not specified, the current directory is used. -batchsize Specifies the number of objects to update per TC XML file. This argument is optional. The default value is 800. -islandsize Specifies the number of objects to update per island. An island ties logically related objects together. For example, a simple island is: [Item, ItemRev, MasterForm] The data in low level TC XML is grouped into islands by closure rules, in which the root objects are assigned island IDs and the traversed objects are assigned new island IDs when an INTER_ISLAND clause is evaluated. The following example illustrates an assembly in which every child component is placed in a separate island. The I at the end is the predicate for the INTER_ISLAND clause. [TYPE.PSOccurrence:CLASS.WorkspaceObject:ATTRIBUTE.child_item: PROCESS+TRAVERSE:$opt_entire_bom=="true" && $opt_hl_tie=="false":I] An example of how island IDs are written in low level TC XML is: Copy Copy Copy This argument is optional. The default value is 100. -untransformed Exports the original values of the specified attributes. This argument is optional. -uidfile Specifies the full path to the input XML file containing a list of object UIDs. This argument is optional. If specified, it suppresses the function of the -cond_prop argument. -h Displays help for this utility. Environment As specified in Setting up a Teamcenter command-line environment. Files As specified in the Log files produced by Teamcenter. Restrictions The IDSM server must be running when you use this utility. You must use either the -inputfile argument, or the -type, -update_prop, -update_value, -cond_prop and -cond_value arguments. Note The condition arguments are the equivalent of the where clause in an SQL phrase. Running this utility without specifying the -cond_prop and -cond_value arguments it technically possible, but impractical. Examples To update the attributes of certain properties as specified in the propFile.xml file, enter the following command on a single line. Copy attribute_export -u=Tc-admin-user -p=password -g=group -inputfile= d:\propFile.xml -log=logFile.txt To update prop3 to value3 and prop4 to value4 for type1 objects, when prop1 equals value1 and prop2 is greater than value2, enter the following command on a single line. Copy attribute_export -u=Tc-admin-user -p=password -g=group -type=type1 -cond_prop=prop1 -cond_value="value1" -cond_prop=prop2 -cond_value="value2" -cond_operator="GT" -update_prop=prop3 -update_value="value3" -update_prop=prop4 -update_value="value4" To update prop3 to value3 and prop4 to value4 for type1 objects, when prop1 equals value1 and prop2 is greater than value2 in batches of 400, enter the following command on a single line. Copy attribute_export -u=Tc-admin-user -p=password -g=group -type=type1 -cond_prop=prop1 -cond_value="value1" -cond_prop=prop2 -cond_value="value2" -cond_operator="GT" -update_prop=prop3 -update_value="value3" -update_prop=prop4 -update_value="value4" -batchsize=400 To update an object description to red Desc and the object name to This is a new object name for all items where the object_name property is my object and the str_attr property is red,white,yellow, enter the following command on a single line. Copy attribute_export -u=Tc-admin-user -p=password -g=group -type=Item -update_prop=object_desc -update_value="red Desc" -update_prop=object_name -update_value="This is a new obj name" -cond_prop=object_name -cond_value="my obj" -cond_value="str attr" -cond_value="red,white,yellow" To update an object description to blue Desc and the int_VLA to 10,3,0,99 for all datasets where the object_name property is TextData_es_ES and the last_mod_date property is 01-DEC-2011 00:00 or greater, enter the following command on a single line. Copy attribute_export -u=Tc-admin-user -p=password -g=group -type=Dataset -update_prop=object_desc -update_value="blue Desc" -update_prop="int_VLA" -update_value="10,3,0,99" -cond_prop=object_name -cond_value="TextData_es_ES" -cond_prop="last_mod_date" -cond_value= "01-DEC-2011 00:00" -cond_operator="GE" To update the char_VLA to w,y.d,k,a for all items where the owning_user property is AsL5bfuW4ghudD, enter the following command on a single line. Copy attribute_export -u=Tc-admin-user -p=password -g=group -type=Item -update_prop="char VLA" -update_value="w,y,d,k,a" -cond_prop=owning_user -cond_value="AsL5bfuW4ghudD" Related Topics TC XML and PLM XML Configuration for Data Import and Export Multi-Site Collaboration

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