TeamcenterKnowledge

Data sharing utilities

item_export

Exports a single item or multiple items in batch mode. It is the companion to the item_import utility. This utility supports part family templates and members and works with the TC_relation_required_on_export and TC_relation_required_on_transfer preferences. Syntax item_export [-u=user-id {-p=password | -pf=password-file} -g=group] -dir=directory {-item=item-id | -keykey-id [-rev=revision-selector] | -filename=input-file | -itemKeyFile=file-name} {-owning_site=site-name | -target_site=site-name1, site-name2, ...} [-exclude=relation-type1 -exclude=relation-type2...] [-include=relation-type1 -include=relation-type2...] [-reason=export-reason] [-latest_ds_version] [-include_bom] [-batch_objects=list-of-deferred-classes] [-batch_file=file-name-listing-deferred-classes] [-deferred_batch_size=batch-size-for-deferred-objects] [-preview] [-report=file-name] [-continue_on_error] [-xfr_top_lvl_only] [-xfr_top_asm_only] [-xcl_files] [-status=release-status] [-exclude_folder_contents] [-classoffile=class-name] [-separator=separator-character] [-dont_exclude_protected] [-email=email-address] [-script=script-name] [revision-selector] [-include_bc] [-include_supercedures] [-v] [-h] Arguments Entries in parentheses are accepted abbreviations for arguments. -u Specifies the user ID. This is a user with Teamcenter administration privileges. If Security Services single sign-on (SSO) is enabled for your server, the -u and -p arguments are authenticated externally through SSO rather than being authenticated against the Teamcenter database. If you do not supply these arguments, the utility attempts to join an existing SSO session. If no session is found, you are prompted to enter a user ID and password. -p Specifies the 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. If used without a value, the user's default group is assumed. -dir Specifies the full path of the directory where the metafile and data files are stored. -item Specifies the ID of the item to be exported. Valid only if no input file is specified using the -i argument. -key Specifies the key of the object. You can use the -item argument or the -key argument. To find the key of an object, use the get_key_string utility. -rev Identifies the revision to be exported. This can be the revision ID or one of the following keywords: LATEST LATEST_WORKING LATEST_RELEASED LATEST_WORKING_OR_RELEASED USE_STATUS If the USE_STATUS keyword is given, you must specify a release status using the -status argument. This is valid only when you are not transferring site ownership. If used with an input file (-i argument), the revision keyword is used for every item in the input file. Keywords cannot be specified using the command line; however, you can use revision selectors at the command line as discussed below. Note The revision ID cannot be specified when using an input file. -filename (fn) Specifies the name of an input file that contains the list of item IDs to be exported. The format of the text file must contain the -item= prefix to each item ID. For example, to export item IDs 002259, 002260, and 002261, the input file contains the following entries: Copy -item=002259 -item=002260 -item=002261 -keyFileName Specifies the name of the input file containing the keys to be exported. The file format is: Copy -key = [keyAttr1=keyVal1][keyAttr2=keyVal2]… -key =[keyAttr1=keyVal1][keyAttr2=keyVal2]… -key =[keyAttr1=keyVal1][keyAttr2=’keyVal2’]… -classoffile (cof) Specifies the class of objects contained in the input file. If no class is specified, the default class is Item. Valid only with the -filename argument. -separator (sep) Specifies the character to separate the item and revision IDs in the file. The default is /. -target_site (ts) Specifies the export target site or sites. If more than one site is specified, sites must be separated by a comma and the entire string must be enclosed in quotes. Either the -target_site or -owning_site argument is required. -owning_site (os) Specifies the site to which ownership is transferred. Either the -target_site or -owning_site argument is required. -exclude (exc) Specifies the relation type to be excluded. This argument may be given multiple times, and the database name (not the display name) of the relation type must be specified. You cannot exclude the IMAN_master_form and TC_ic_intent_rtype relation types with or without ownership transfer. Also, you cannot exclude the IMAN_RES_audit with ownership transfer. -include (inc) Specifies the relation type to be included. This argument may be given multiple times, and the database name (not the display name) of the relation type must be specified. You cannot include the IMAN_RES_checkout and IMAN_based_on relation types. -exclude_folder_contents (efc) Excludes the contents of a folder. Intended for use with NX Part families where family members are stored in a folder that is attached to the item. -dont_exclude_protected (dxp) Does not exclude export-protected objects. If set, any export-protected object within an item prevents the export of the entire item. -reason (rea) Specifies the reason for exporting to sites. Up to 240 characters. -latest_ds_version (ldv) Exports only the latest version of datasets; default is to export all versions. Valid only when site ownership is not being transferred. -include_bom (bom) Exports all components if the given item is an assembly. -preview (pre) Performs an export dry run and generates a report to the file specified by the -report argument. If the -report argument is not specified, the report is output to the screen. -report (rep) Outputs preview or completion reports to the specified file. If no report file name is specified, the report is output to the screen. -continue_on_error (con) Continues the export operation even if errors are detected on optional objects. Optional objects are attachments other than requirement, specification, or primary form objects. -xfr_top_lvl_only Only transfers ownership on top-level items specified in the input file. -xfr_top_asm_only Transfers ownership only on the top-level assembly items, as specified in the input. -xcl_files Excludes export of files in datasets. -include_pfmembers Identifies the related part family members to be exported when handling part family templates. -include_pftemplates Identifies the related part family template to be exported when handling part family members. -pf_bom_treatment Identifies the part family objects associated with the assemblies to be exported. The argument must be used in conjunction with the -include_bom argument. Valid options are: -members Includes part family member components present in the assembly. -templates Includes part family template rather than part family member components. -all Includes both the part family member components and templates. -none Includes neither the part family member components nor the templates. -status (stat) Specifies the release status type to use for selecting the item revision to be exported. -include_bc Exports the change revision along with the BOMChange objects associated with the affected assemblies of the change revision. -include_supercedures Exports the change revision along with the supercedures associated with the BOMChange objects. -email Specifies the email address to which the export report is sent. The default address is stored in the Teamcenter user account. -script Specifies the name of the script in the TC_BIN directory that is executed after a successful export. If a script is already defined by the TC_post_export_script preference, the specified script overrides the preference entry. -revision_selector Determines which item revision is exported with the item. The valid selectors are as follows: latest_revision (lt) Exports the latest revision only, regardless of whether it is a working or released revision. latest_working (lw) Exports the latest working revision only. latest_released (lr) Exports the latest released revision only with any release status. latest_working_or_any (lwoa) Exports the latest working revision. If no working revision exists, it exports the latest released revision with any release status. status (stat) Specifies the release status to be exported. If no revision selector is given, all revisions are exported. Note Revision selectors should be capitalized only when used with the -rev= switch and should be in lower case when used as a switch. -v Runs utility in verbose mode to display maximum amount of information. Typically, nonverbose utility sessions only display error messages. -batch_objects (bo) Specifies a list of comma-separated deferred classes. If you use this argument with the preview argument, only nondeferred objects with the number of deferred objects appear in the report. -batch_file (bof) Specifies the file name of a text file containing a list of deferred classes. -deferred_batch_size (dbs) Specifies the number of objects per batch; a new process is created per batch. The default value is 1000. This value must be a positive integer. Use this argument to process thousands of objects to avoid memory and disk shortage problems. The following classes are supported for deferred objects: Dataset Folder Form ImanRelation MEAppearancePathNode NamedVariantExpression PSOccurrence VariantExpression VariantExpressionBlock -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 -item argument is mutually exclusive with the -i and -filename arguments. Either the -target_site or -owning_site argument must be specified and must not be a local site. It is the responsibility of the user exporting objects to inform the system administrator which directories need to be exported and to which site. It is the responsibility of the system administrator to set up the list of other sites which are known to the local site. It is the responsibility of the system administrator to send directories of the exported objects to the receiving sites, users, volumes, and other systems. Administration object types cannot be exported. Examples To restart a checkpoint transaction that failed during import: Copy item_export -transaction_id=AjEZaOnRAAAFfD -restart 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/item_export.html · retrieved Fri Jul 31 2026 00:00:00 GMT+0000 (Coordinated Universal Time)