TeamcenterKnowledge

Data sharing utilities

tcxml_export

Exports objects from Teamcenter in the TC XML format. If there are files for export, the utility creates a File Management System (FMS) read file ticket and saves it in the output XML file for each file. Note Do not use the tcxml_export utility for exporting administration data. For exporting administration data, use the admin_data_export utility. Syntax tcxml_export [-u=user-id [-p=password | -pf=password-file] [-g=group] ] -file=output-xml-file {-item=item-id [-rev=revision-id] |-folder=folder-name | -class=POM-classname | -uid=uid-of-object | -item_key=attr-name1=value, attr-name2=value, ... | -inputfile=file-name | -inputuidfile=file-name} [-transfermode=transfer-mode-name | -optionset=transfer-option-set-name] [-targetsites=list-of-target-site-ids] [-transferownership] [-sync] [-incrementalChangeDelta] [-force_reexport] [-reason=reason-for-export] [-revrule =revision-rule] [-bomlevel =desired-bom-level] [-svrule=saved-variant-rule-name [:rev-id:rule-id]] [-processUnconfiguredByOccEff] [-processSuppressedOcc] [-processUnconfiguredVariants] [-processUnconfiguredChanges] [-baseline_id] [-basline_rev] [-generateBOMIndex] [-fromBOMIndex] [-xsl=xsl-file-name] [-session_options=option-1:value-1,option-2:value-2,...option-n:value-n] [-session_options_file=options-file-name] [-requiredLang=locale-code-1, locale-code-2, ..., locale-code-n] [-allowedLang=locale-code-1, locale-code-2, ..., locale-code-n] [-briefcase] [-dryrun [=validateXMLBeforeXslt]] [-validate [=validateXMLBeforeXslt]] [-low-level {-inputfile=file-with-item-ids | -inputuidfile=file-with-uids} [-bulk_extract] [-input_criteria=class-name{attribute1=value1,attribute2=value2,..,attributen=valuen}] [-force_retraverse]] [-verbose] [-h] Arguments -u Specifies the user ID. 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. 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. -file Specifies the output file name. The value can be either an absolute path (full path name) or a relative path name. By default, the output file contains XML. When the -dryrun or -validate option is specified, the file contains an HTML report of any warnings or errors in the TC XML. When using the -dryrun or -validate option, append a .html extension to the file name. -item Specifies the item_id values of one or more items to be exported. Multiple values are separated by colons. -rev Specifies the revision ID of the item to be exported. If this argument is not specified, the configured revision (either specified or default) is exported for the item. -folder Specifies the folder containing objects to be exported. -class Specifies a class name. Instances of this POM class are exported. The following workspace object names are valid: Item ItemRevision Folder Dataset Alias ImanFile ImanRelation ReleaseStatus IdContext Identifier PSBOMView PSBOMViewRevision TransferMode TransferOptionSet -uid Specifies the UID of an object (one object only). -item_key Specifies a comma-delimited list of attributes used to identify the object to be exported. -item_key supports multifield keys using the following form: Copy -item_key=attribute_name_1=value_1, attribute_name_2=value_2,... -inputfile Specifies the name of a text file containing the item IDs of objects you want to export. -inputfile also supports multifield keys. The file must have separate lines for the item attributes you want to use to identify the objects, for example: Copy item_id=export_001 item_id=M2Item1_001,object_name=M2Item_name1,object_type=M2Item1 -inputuidfile Specifies the name of a text file containing the UIDs of objects you want to export. The file must have separate lines containing the object UID. For lightweight object UIDs, provide the UID and the object class separated by a colon. -transfermode Specifies the transfer mode name used to export the objects. If this argument is not specified, the utility uses a default transfer mode. See restriction 2. -optionset Specifies the transfer option set name used to export the objects. Mutually exclusive with the -transfermode argument. If you specify both, the command does not fail. However, the transfer mode indicated by this -optionset argument takes precedence over the transfer mode specified by the -transfermode argument. See restriction 3. -targetsites Specifies a comma-delimited list of destination site IDs. If used with the -transferownership argument, -targetsites must contain only one site ID. -transferownership Indicates that this export transfers the ownership of exported objects to the specified target site. You must specify only one site ID in the -targetsites argument if you use this argument. -sync Indicates that this export is for data synchronization. -incrementalChangeDelta Exports modified objects tracked by configured incremental change as a partial structure export. Because incremental change data is configured data, you must specify a configured transfer option set for the -optionset argument. The -processUnconfiguredChanges and -processSuppressedOcc arguments are ignored if they are included. -force_reexport Repeats the most recent configured export specified by the values of the following arguments: -item, -targetsites, -revrule, and -svrule. Configured exports of high level and low level TC XML to managed or unmanaged sites are supported. Full and partial BOM exports are also supported. Objects do not need to be marked for ownership transfer. The same ownership transfer specifications are used as in the previous export. Objects with their ownership transferred in the previous export are also included in this export. If the previous export meeting this criteria was a full export, the full export is repeated, including changes since the previous full export. If there is no previous export, a full export is created. -reason Specifies the reason for this export. -revrule Specifies the revision rule used to configure the exported BOM with the specified item as the top line. -bomlevel Specifies the level in the BOM. -svrule Specifies a saved variant rule to use when configuring the exported BOM. Optionally, specify a particular revision of a variant rule object by providing its revision ID and rule ID separated by colons. Variant rule revision use is supported for only Cfg0VariantCriteria, a revisable subclass of the VariantRule object. -processUnconfiguredByOccEff Exports BOMLine objects that are not configured for occurrence effectivity. -processSuppressedOcc Exports suppressed BOMLine objects. -processUnconfiguredVariants Exports BOMLine objects that are not selected by BOMLine object’s variant conditions. -processUnconfiguredChanges Exports BOMLine objects configured out of the BOM by incremental change. -baseline_id Specifies the baseline ID for exporting a configured minor revision. -baseline_rev Specifies the baseline revision ID for exporting a configured minor revision. -generateBOMIndex Saves BOMLine data to persistent tables. The TC XML data is not serialized. -fromBOMIndex Exports the BOMLine data directly from the persistent cache without configuring and expanding the BOM. -xsl Specifies the output XSL file to apply to the TC XML file after export. -session_options Specifies a comma-separated list of option name-value pairs. Names and values are delimited by colons, for example: Copy ContinueOnError:TRUE,GenerateReport:TRUE -session_options_file Specifies an ASCII file containing session option settings using option name-value pairs. Use this option instead of the -session_options option when you are reusing long lists of session name-value pairs and when values contain system-reserved special characters. Place one name-value pair on each line of the file as follows: Copy option_1:value_1 option_2:value_2 . . . option_n:value_n Set an option only once in the file. -requiredLang Specifies a list of comma separated locale values. This list is used to ensure that localized attributes in the exported data have at least one representation that can be used as the attribute primary language at the importing site. It also defines a priority order for the exporter to determine the attribute primary language. The valid locale values must match the Java locale naming convention that consists of two groups of two-character identifiers separated by an underscore character () for a particular combination of language and region. For example, zh_CN represents Simplified Chinese in China and en_US represents English in the United States. -allowedLang Specifies a list of comma separated locale values. This list is used to get additional representations for localized attributes in the exported data for use at the importing site. The valid locale values must match the Java locale naming convention that consists of two groups of two-character identifiers separated by an underscore character () for a particular combination of language and region. For example, zh_CN represents Simplified Chinese in China and en_US represents English in the United States. -briefcase Specifies the output be formatted as a briefcase file. The file is specified with the -file option. -briefcase is only supported when exporting to managed sites. Sites must be specified using -targetsites. -dryrun Specifies a simulated low-level TC XML export be run and the exported TC XML be validated. Warnings and errors in the TC XML are reported in the file specified by -file. If -dryrun=validateXMLBeforeXslt is specified, the internal (pre-export) TC XML is validated instead of the exported TC XML. A briefcase file not created in either case. -dryrun cannot be used with the -validate option. -validate Specifies that the exported TC XML be validated. If no warnings or errors are detected in the TC XML, the briefcase file is created. If warnings or errors are detected in the TC XML, they are reported in the file specified by -file (with a .html extension) and no briefcase file is created. If -validate=validateXMLBeforeXslt is specified, the internal (pre-export) TC XML is validated instead of the exported TC XML. -validate cannot be used with the -dryrun option. -h Displays help for this utility. Fast export arguments The following arguments support low-level fast export functions used for site consolidation activities. The use of these arguments requires the SITCONS_AUTH_KEY environment variable be set to a valid license key. Open a support case on Support Center to get this license key. Export files created using the low-level export do not contain global stable identifier (GSID) attributes. -low_level Performs fast export using POM-level APIs as a DBA user. You must specify this argument to use any of the fast export arguments. In addition to the other fast export arguments, you can use any of the following standard tcxml_export arguments when you specify the -low_level argument. -folder -file -targetsites -transfermode -optionset -reason Note The -requiredLang, -allowedLang, and -transferownership arguments are ignored if you supply them with the -low_level argument. -bulk_extract Extracts product data into a briefcase (.bcz) file that contains low-level TC XML and associated physical files used to bulk load the data into a test environment. This briefcase file is explicitly for a test environment and cannot be used for exchanging data with suppliers. You can supply the -optionset argument if the transfer options set has its opt_bulk_extract_bcz option set to TRUE. If you do not specify the -optionset argument, the utility uses the UnconfiguredBulkExtractDefault transfer option set. The -force_retraverse argument is set with the -bulk_extract argument. The following arguments are ignored if you supply them with the -bulk_extract argument: -allowedLang -incrementalChangeDelta -requiredLang -sync -targetsites -transferownership If you do not have read and import privileges on an object when using the -bulk_extract argument, the object is exported as a stub in the TC XML file and the object's status in the export log is listed as STUB_INSUFFICIENT_PRIVILEGE. For example: Copy id14 [wuQtjENzAAgcRA] of type [Item ] - STUB_INSUFFICIENT_PRIVILEGE -input_critieria Identifies the criteria for specifying root objects for export. The class name and attribute values are used to search for the object or objects you want exported. Only single value attributes, including attributes from the parent classes, are supported. Subclasses are not included. Only the AND condition is allowed between different attributes. You can specify an attribute only once. Wildcard characters are supported as defined in the TC_pattern_match_style preference. For example, to export all items with a 6 character item ID starting with 0000 and the object name starting with Top: Copy tcxml_export -input_criteria=Item{item_id=0000??,object_Name=Top*} -bulk_extract -file=abc_top.bcz No other special character operators are supported. For example, the following characters are not supported and cannot be used in the class name, attribute name, or attribute value: { } = , The attribute value for a date range must be in the following format: Copy attribute-name="start-date to end-date" For example, to specify objects created from 20 March to 1 April: creation_date="20–Mar-2014 04:00 to 1–Apr-2014 04:00" For an object reference type attribute, use the UID as the attribute value. This is true for any TC XML export. -inputfile Specifies a file that contains a list of item IDs indicating items to export using fast low-level export. You must include either this argument or the -inputuidfile argument when using the -low_level argument. If your Teamcenter environment uses multifield key identifiers, you must specify the multifield key values for the item_id attribute as a list of comma-separated values in the input file, for example: Copy item_id=M2Item1_001,object_name=M2_Item_name1,object_type=M2Item1 The input file may contain both multifield key and standard item ID values, for example: Copy Item_id=Ace1 Item_id=lor1,object_name=fixedPl,object_type=type Item_id=lor2,object_descr=acmetool,object_type=type -inputuidfile Specifies a file that contains a list of UIDs indicating items to export using fast low-level export. You must include either this argument or the -inputfile argument when using the -low_level argument. -force_retraverse Forces retraversal of previously replicated or exported objects during fast low-level export. -verbose Displays additional details during progress updates. Environment As specified in Setting up a Teamcenter command-line environment. Files As specified in Log files produced by Teamcenter. Restrictions Not all PLM data is supported. For a list of objects that are supported, see Teamcenter Data Exchange. If you specify the TransferMode or TransferOptionSet object as the -class argument value, you are not required to specify the -transfermode or -optionset arguments. A predefined transfer mode is used for exporting these objects. If these arguments are specified they are ignored. To export related dataset files, you must specify the -transfermode argument. The arguments value must be set to an option set containing closure rules that traverse dataset files related to the primary object. The TIEExportDefaultTM transfer mode contains a standard option set that can be used for this purpose. Examples Select an item and export the item and its attachments using the default export transfer mode. The output XML file, exportitem.xml, is created in the directory where this command is executed. Copy tcxml_export -item=item_ID -file=exportitem.xml Select an item revision and export its attachments using the default export transfer mode. The output XML file, itemrev.xml, is created in the directory where this command is executed. Copy tcxml_export -item=item_ID -rev=item_rev -file=itemrev.xml Export the contents of the exportObjects folder using the default export transfer mode. If objects in the folder are supported objects, they are also exported. The output XML file, folder.xml, is created in the directory where this command is executed. Copy tcxml_export -folder=exportObjects -file=folder.xml Export item 000001 using the TIEUnconfiguredExportDefault transfer mode. Copy tcxml_export -item=000001 -file=exportitem.xml -optionset=TIEUnconfiguredExportDefault Synchronize item 000001. Copy tcxml_export -item=000001 -file=itemsync.xml -optionset=TransferOptionSet -sync -reason=ItemIsOutDated Export the Latest Working revision of the Top1 item using the TIEConfiguredExportDefault transfer option set. Copy tcxml_export -item=Top1 -optionset=TIEConfiguredExportDefault -revrule="Latest Working" -file=D:\temp\Top1_HL.xml Export a partial structure that includes only the changes to the Top1 assembly that are tracked by configured incremental change: Copy tcxml_export -item=Top1 -targetsites=-2054508072 -optionset=TIEConfiguredExportDefault -revrule="Latest Working" -sync -incrementalChangeDelta -file=/tmp/0001_delta.xml Fast export the objects identified in the inp.txt file using the VARIANTRULE1 saved variant rule to site 56781234. Copy tcxml_export -low_level -inputfile=d:\Temp\inp.txt -file=d:\Temp\top1_ll.xml -optionset=TIEConfiguredExportDefault -svrule=VARIANTRULE1 -targetsites=-2054508072 Fast export the Latest Working revisions of the objects, including suppressed BOM lines and BOM lines configured out by incremental changes. Copy tcxml_export -low_level -inputfile=d:\Temp\inp.txt -file=d:\Temp\top1_ll.xml -optionset=TIEConfiguredExportDefault -revrule="Latest Working" -svrule=VARIANTRULE1 -processSuppressedOcc -processIncrementalChanges Simulate a low-level briefcase export, validating the exported low-level TC XML and generating an error report (and no briefcase file). Copy tcxml_export -file=d:\Temp\report.html -item=root_obj_ID -optionset=TIEConfiguredLLBCZExportDefault -briefcase -targetsites=site_ID -dryrun Simulate a low-level briefcase export, validating the internal (pre-export) low-level TC XML and generating an error report (and no briefcase file). Copy tcxml_export -file=d:\Temp\report.html -item=root_obj_ID -optionset=TIEConfiguredLLBCZExportDefault -briefcase -targetsites=site_ID -dryrun=validateXMLBeforeXslt Perform a low-level briefcase export, validating the exported TC XML and creating a briefcase file if no warnings or errors are encountered. If errors or warnings are encountered, create a report file. Copy tcxml_export -file=d:\Temp\briefcase.bcz -item=root_obj_ID -optionset=TIEConfiguredLLBCZExportDefault -briefcase -targetsites=site_ID -validate The following are site consolidation examples: To export the objects to a specified site. Copy tcxml_export -optionset=SiteConsolidationDefault -targetsite=-2054508072 -inputfile=d:\input.txt -file=d:\out.xml -low_level To synchronize the objects already exported (low level) to a specified site. Copy tcxml_export -sync -file=d:\out.xml -low_level Special cases for tcxml_export: Export in-process workflow Items: Export the item in the workflow. Search for workflow job corresponding to that item. Copy this job and paste it into a new folder using a unique name. Export this folder to export the job. When a workflow process is exported with transfer ownership to the target site, the My Worklist→Inbox→Tasks to Perform folder at the target site does not display the task. To display the task, the affected users must delete the Inbox and restart their client. Similarly, to display tasks in ResourcePool Inbox, delete its Tasks to Track and Tasks to Perform subfolders. Export a collaboration context object (CCO): In the rich client, search for the CCO. Copy the CCO and paste it into a new folder with a unique name. Export this folder to export the CCO and the entire structure context. Export the associated product structures. Low-level synchronization process example: Create the tables and triggers using an SQL script before exporting the data. You can use an edited version of the following sample script, located in your TC_ROOT/install/sitecons directory, to manage the tables in separate tables spaces for the site consolidation tables. Before you run the script, edit the highlighted parameter values for your site. Copy sitcons_create_tablespace.sql /* Copyright Siemens Product Lifecycle Management Software Inc. All Rights Reserved. / / This is a sample script that can be used by the administrator. The following parameters namely datafile, size, autoextend on maxsize, extent management local uniform size are the variables that need to be changed as required. Also, the tablespace can be named as desired / / Creates a separate table space to be used later for ACCT_TABLE creation /
create tablespace TCSITCONS datafile 'D:\oracle\product\10.2.0\oradata\test\TCSITCONS.dbf' size 10M autoextend on maxsize 100M extent management local uniform size 64K; /
Creates the table ACCT_TABLE using above table space */ create table ACCT_TABLE( exp_obj_uid varchar2(15) PRIMARY KEY, led date, island_anchor_uid varchar2(15), state NUMBER) tablespace TCSITCONS; create table SCRATCH_TABLE( puid varchar2(15), lsd date, trigger_condition NUMBER) tablespace TCSITCONS; CREATE INDEX "SCRATCH_TABLE_INDEX" ON "SCRATCH_TABLE" (puid); create or replace trigger fast_sync_add_trigger before insert on PPOM_OBJECT referencing new as newRow for each row BEGIN insert into scratch_table values (:newRow.puid, :newRow.plsd, '8'); END;
/
create or replace trigger fast_sync_delete_trigger after delete on PPOM_OBJECT referencing old as oldRow for each row BEGIN insert into scratch_table values (:oldRow.puid, :oldRow.plsd, '9'); END; / Export the data using the tcxml_export utility in low-level mode: Copy tcxml_export -optionset=SiteConsolidationDefault -targetsite=-2054508072 -inputfile=d:\input.txt -file=d:\out.xml -low_level Import the data at the target site using the tcxml_import utility in low-level mode: Copy tcxml_import -file=d:\out.xml -low_level Copy the import-generated out_import_results.txt file to the source site and run the tcxml_confirm_export utility in low-level mode: Copy tcxml_confirm_export -file=d:\out_import_results.txt -low_level Add, delete, and change the low-level exported data as needed. Run the tcxml_export utility with the -sync argument. Copy tcxml_export -file=d:\sync.xml -low_level -sync -optionset=SiteConsolidationDefault -inputfile=d:\input.txt Import the generated XML file using tcxml_import low-level mode. Repeat the earlier step to copy the import-generated out_import_results.txt file to the source site and run the tcxml_confirm_export utility in the low-level mode. Copy tcxml_confirm_export -file=d:\out_import_results.txt -low_level Fast synchronization operations depend on the time stamp on the local server machine where an object is saved and edited. Therefore, modifying objects on different machines with different system times may influence the identification of out-of-sync status. 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/tcplmxml_export.html · retrieved Fri Jul 31 2026 00:00:00 GMT+0000 (Coordinated Universal Time)