NX UG Export fails for special character in Item ID

2021-10-06T23:28:07Z
NX for Design

Summary


Details

We are trying to export data with UG_Export utility provided in NX installation image bundle.


The utility fails to execute for the Item Id's having special character(/,.,%, and other mathematical symbols) in them. The CLI command we used-


For example:


call ug_export -part="5000-9934-B/5000-9939-B" -rev="D" -mapping=D:\NXExport\map.txt -export_dir="Export/Directory" -u=infodba -p=password -g=dba -as_saved


call ug_export -part="80% Vault" -rev="1" -mapping=D:\NXExport\map.txt -export_dir=""Export/Directory" -u=infodba -p=password -g=dba -as_saved


call ug_export -part="800.0700.13.00-ARBOR-LRG-PL" -rev="A" -mapping=D:\NXExport\map.txt -export_dir=""Export/Directory" -u=infodba -p=password -g=dba -as_saved




Then we tried to extract with UG_Clone utility through CLI command. But it fails to extract with errors.


Though , we are able to extract the assembly manually through NX UI with the help of "File --> Export assembly outside Teamcenter" command.



Solution

From the Teamcenter documentation under Sharing Data --> Data Exchange --> Introduction --> Basic Concepts --> Special Characters in Teamcenter Import Files:


https://docs.plm.automation.siemens.com/tdoc/tc/12.1/help/#uid:xid1048845 




Special characters in Teamcenter import files

Teamcenter generally excepts all characters that are legal for the underlying database's character set when the tcserver process is configured for a compatible character set.

Teamcenter does not attempt to filter characters (with a few exceptions) when importing files. The user interface blocks nonprintable characters for the operating systems character set. However, the nonprintable characters can be imported from a file.

The underlying database rejects characters that do not belong to the database's declared character set. For example, if you set the database to the 8-bit US ASCII (ISO 8859-1) character set, it rejects characters that are not defined for that code page. However, if you set the database for a 7-bit ASCII character set, it allows noncode page 8-bit characters because it does not validate the high bit.

Teamcenter does filter specific strings in places that are a security concern due to potential command injection attacks. For example, Teamcenter rejects a semicolon (; ) or the string rsh if they are in a file name.

Additionally, Siemens PLM Software recommends that you do not use the following characters in item IDs to avoid potential database issue:

Single quotation mark (' )

Double quotation mark (" )

Slash (/ )

Backslash (\ )

Colon ( : )

Less than (< )

Greater than (> )

Vertical bar ()

Tilde (~ )

Back tic (` )

For Teamcenter 10.1.4 and later versions, when you export a variable length array (VLA) of string type in a TC XML file, the export process inserts a slash (\ ) character before the predefined separator character and any slash characters in property values. The predefined separator character is defined in the GMS_tcxml_string_separator preference and is a comma (, ) by default.

For example, when exporting the following VLA string property values:

prop[0] "ab,c"
prop[1] "d\ef"
The output file contains:

prop="ab\,c,d\\ef
A slash character is prefixed to the slash and comma (default separator) in the strings. During the import process, the tcxml_import utility parses the property correctly and the values are the same at both the exporting and importing site. In prior versions of Teamcenter, the output file contained three values ("ab" , "c" , and "d\ef" ) and the import process could not properly parse them into values that matched the exporting site values.




Hardware/Software Configuration

Platform: na
OS: n-a
OS Version: n-a
Product: NX
Application: NXMANAGER
Function: CLONE_EXPORT

Ref: 002-8569338

KB Article ID# PL8569338

Contents

SummaryDetails

Associated Components

Teamcenter Integration for NX