Install File New templates

The New dialog box (File→New) contains tabs with one or more templates on each tab. Each tab is defined by a PAX (.pax) file and the applicable templates are defined in the PAX file. Each template defined refers to a Command Line Interface (CLI) file specification of the form @DB/<Itemid>/<RevId> that must be available in the Teamcenter database. The CLI file contains the template information for the item, such as colors, layers, or datums.

The standard template PAX files delivered with the software and their associated template part files are located in the %UGII_ROOT_DIR%\templates directory.

The PAX files delivered with NX 5 and later are designed to be used with the templates provided in the New dialog box. They do not support the functionality provided in NX 4 and earlier releases that use seed parts and provide them on the resource bar. However, if you want to keep the previous functionality, for NX 5 and later releases, you can still use seed parts on the resource bar with NX 4 PAX file definitions.

Installing templates

The standard part files delivered with the software must be imported into the Teamcenter database to enable access by the New dialog box. If this step is not performed, the New dialog box displays only blank templates.

Note:

This does not need to be done if you are running native NX (without Teamcenter Integration).

Note:

Simulation files (.fem and .sim) can also be used in templates.

To import the parts, run the template setup script provided in the %UGII_ROOT_DIR%\templates\sample directory in a Teamcenter Command Prompt window with the appropriate NX and Teamcenter environment set:

The script uses the ug_clone utility to import the template parts into the Teamcenter database and update the PAX files, if required.

After the script is executed, the template parts are located in the NX Templates folder in your user folder in My Teamcenter.

If a naming switch is not provided, the script executes ug_clone with the auto-translate naming rule. This option can be used only at sites where the Teamcenter business rules on the item and revision IDs do not conflict with the as-delivered auto-translate naming rule.

Installing templates using autogenerate

If you have an environment where you use customized user exits and business rules for Item and Item Revision naming, then you need to have the Items and Item Revisions for the templates autogenerated to assign the correct IDs during database import. Also, new PAX files need to be generated based on the autogenerated IDs.

In those cases, the tcin_template_setup script can be used with the auto-generate option. The script runs the ug_clone executable with the auto-generate naming rule and then runs the perl script spinoff_paxfiles_wnt.pl. The script makes copies of the existing PAX files and edits them with the appropriate names. The script is also located in the %UGII_ROOT_DIR%\templates\sample directory. To use the perl script, add the autogenerate option:

If you have the appropriate permissions, the modified PAX files are placed in the %UGII_ROOT_DIR%\templates directory. If you do not have permissions, the files are placed in a pax_files subdirectory in your working directory. You need to move them to the %UGII_ROOT_DIR%\templates directory.

Note:

The autogenerate process must be run only once for each database. If you run it more than once, new item IDs are generated each time the script is executed.

Installing templates with more custom options

If you have an environment where the base ug_clone executable cannot be used to import templates into the database with just the auto-translate or auto-generate naming rules, then the supplied tcin_templates_setup script cannot be used. This can be the situation, for example, if the standard Teamcenter type Item is blocked since the script creates items of type Item.

In these cases, you need to setup the ug_clone executable with the appropriate inputs for item type, item and revision IDs, such as default_type or clone log file switches to handle the import of the templates into the database. Then update the Teamcenter Integration PAX files (prefixed with nxdm_) in the %UGII_ROOT_DIR%\templates directory with the correct CLI file specifications corresponding to the template entries.

Installing templates in a Teamcenter four-tier environment

We recommend that you install the templates in a Teamcenter two-tier environment. If you are required to install in a four-tier environment, perform the following steps to install the templates.

  1. Ensure the following environment variables are set:

    • UGII_UGMGR_COMMUNICATION

    • UGII_UGMGR_HTTP_URL

    • UGII_BASE_DIR

    • UGII_ROOT_DIR

  2. Enter the following from a Teamcenter command prompt:

    "%UGII_ROOT_DIR%\ug_clone.exe" -pim=yes -u=infodba -p=infodba
    -o=import -dir="%UGII_ROOT_DIR%\templates" -default_a=overwrite
    -default_n=autotranslate -aut=legacy -default_f=infodba:"NX Templates"
    -s=nxdm_template_import.clone"