Teamcenter Manager For SolidWorks User Guide Admin

AdminGuide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 75

DownloadTeamcenter Manager For SolidWorks User Guide Admin
Open PDF In BrowserView PDF
Teamcenter Integration for SolidWorks®
Administration Guide
Version 8.3.0

TranscenData
A Business of International TechneGroup Incorporated
DuPont Circle
Milford OH, 45150

ITI PROVIDES THIS PROGRAM AS IS AND WITH ALL FAULTS. ITI SPECIFICALLY
DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE. ITI DOES NOT WARRANT THAT THE OPERATION OF THE
PROGRAM WILL BE UNINTERRUPTED OR ERROR FREE.
i-Man® is a registered trademark of UGS Corp.
Siemens and the Siemens logo are registered trademarks of Siemens AG. UGS, Teamcenter and
UGS Teamcenter are trademarks or registered trademarks of UGS or its subsidiaries. This
software and related documentation are proprietary to UGS Corp. ©2009 UGS Corp. All rights
reserved.
SolidWorks® is a registered trademark of SolidWorks Corporation.
Copyright© 2011 International TechneGroup Incorporated, 5303 DuPont Circle, Milford, Ohio
45150, U.S.A. All Rights Reserved.
This program contains software licensed from UGS Corp. ©2009 UGS Corp. All Rights
Reserved

i

Contents
Introduction ................................................................................................................................... 1
Technical Support ......................................................................................................................... 1
Configuration ................................................................................................................................ 1
Swim.properties .......................................................................................................................... 2
General preferences ................................................................................................................ 3
Open preferences .................................................................................................................... 4
Save preferences ..................................................................................................................... 5
Update preferences.................................................................................................................. 7
swim.xml..................................................................................................................................... 8
Attribute Mapping ................................................................................................................... 8
cad_name ............................................................................................................................ 9
pdm_name ........................................................................................................................... 9
default ............................................................................................................................... 11
missing_attribute_action ................................................................................................... 12
direction ............................................................................................................................ 12
constraint ........................................................................................................................... 13
truncate .............................................................................................................................. 13
Loading the Attribute Mappings into Teamcenter ............................................................ 14
User Defined Columns .......................................................................................................... 14
Column Map ..................................................................................................................... 14
column tag..................................................................................................................... 15
display_name ................................................................................................................ 15
cad_name ...................................................................................................................... 15
pdm_name ..................................................................................................................... 15
BOM Map ............................................................................................................................. 16
BOM View Type............................................................................................................... 16
BOM Properties ................................................................................................................ 16
Auxiliary Files ...................................................................................................................... 18
General Auxiliary Files ..................................................................................................... 18
auxiliary_file ..................................................................................................... 19
cadtopdm_control ................................................................................................ 20
create_text_file ................................................................................................ 20
ets_request ............................................................................................................ 22
file_name ................................................................................................................. 23
os_command............................................................................................................... 23
preview_command................................................................................................... 24
generate_command ................................................................................................ 25
pdm_location .......................................................................................................... 26
Substitution Keywords .................................................................................................. 26
JT Files .......................................................................................................................... 27
Template Map ....................................................................................................................... 28
Using Templates from a Directory ................................................................................... 29
Using Templates from Teamcenter ................................................................................... 29
ii

Dataset Map .......................................................................................................................... 30
Allowed Item Types .......................................................................................................... 30
Submit to Workflow ......................................................................................................... 30
Example Map File ................................................................................................................. 31
swim.cfg .................................................................................................................................... 37
Teamcenter Preferences ............................................................................................................ 38
Utility Functions .......................................................................................................................... 39
Exporting SolidWorks Models from Teamcenter with swimexport ......................................... 39
Usage..................................................................................................................................... 39
Description ............................................................................................................................ 40
Configurations....................................................................................................................... 44
Toolbox Parts ........................................................................................................................ 44
Multiple Model Versions ...................................................................................................... 44
Instruction Files .................................................................................................................... 44
Examples ............................................................................................................................... 45
Importing SolidWorks Models into Teamcenter with swimimport .......................................... 46
Usage..................................................................................................................................... 46
Description ............................................................................................................................ 46
Item IDs, Names, Types, and Revisions ............................................................................... 48
Attributes............................................................................................................................... 48
BOMs .................................................................................................................................... 48
Configurations and Design Tables ........................................................................................ 48
Toolbox Parts ........................................................................................................................ 49
Auxiliary Files ...................................................................................................................... 49
Instruction Files .................................................................................................................... 49
Examples ............................................................................................................................... 51
Renaming SolidWorks Models in Teamcenter with swimrename ........................................... 51
Usage..................................................................................................................................... 52
Description ............................................................................................................................ 52
Examples ............................................................................................................................... 54
Troubleshooting .......................................................................................................................... 55
General guidelines .................................................................................................................... 55
Logging ................................................................................................................................. 55
Reporting problems ............................................................................................................... 56
Integration launch ..................................................................................................................... 56
Installation errors ...................................................................................................................... 59
Runtime problems ..................................................................................................................... 62
Best Practice Recommendations ................................................................................................ 64
Configurations........................................................................................................................... 64
Integration preferences related to configurations ................................................................. 64
SolidWorks Toolbox ................................................................................................................. 64
SolidWorks SpeedPak ............................................................................................................... 64
Multisite .................................................................................................................................... 65
Configuring Teamcenter Multi-Site to Export SolidWorks Models..................................... 65
iii

Configuring Teamcenter Multi-Site for Transferring Ownership of SolidWorks Models ... 65
Configuring the Teamcenter Integration for SolidWorks for Performance .............................. 66
Configuring Teamcenter for Single Workflow ......................................................................... 66
Restricted access to data ........................................................................................................... 67
Opening a model with access restrictions ............................................................................. 67
Saving a model with access restrictions................................................................................ 69

iv

Introduction
When first installed, the Teamcenter® Integration for SolidWorks® is configured to satisfy most
customers‟ requirements. As users become more experienced with the product, the Teamcenter
Administrator may want to change certain settings to align with customer-specific requirements
and processes. The Configuration section of this document explains how to change the
configuration, and why you may want to do so.
The integration provides a set of utility programs to perform administrative-level functions on
SolidWorks data. Those functions, and their usage, are described in the Utility Functions section
of this document.
Finally, there is a small set of known issues that customers may encounter when working with
the product. These are covered in the Troubleshooting and Best Practices sections.

Technical Support
For technical support, please contact the Global Technical Access Center (GTAC). You can
reach GTAC via the World Wide Web at http://support.ugs.com/ or by telephone:
United States and Canada (800) 955-0000
In other countries please see http://support.ugs.com/html/by_phone/ for additional telephone
numbers, or call (714) 952-5444.

Configuration
The integration‟s CAD data management behavior is controlled by settings in four different
locations:


swim.properties
o This properties file may be controlled at the site level, and also made available to
users or groups of users for overriding of selected preferences. It is a text file
containing a list of keywords and values. Each keyword is documented within the
file, and each has a default value. Together they form a set of preferences which are
read when SolidWorks is launched with the integration loaded. If the value for a
particular keyword is not modified, then the default value remains in effect. Some
preferences in the swim.properties file are best controlled at the site level, while
others may be user-specific. The Teamcenter Administrator at each site must decide
which settings users are allowed to override.



swim.xml
o A set of maps to control integration behavior at the site level. This file is not designed
for modification by anyone but the Teamcenter Administrator.



swim.cfg
o This file exists only on the integration client workstations. It is not designed for sitelevel administration, although customers may choose to install the integration in a

1

network-accessible location, and allow users to launch using desktop shortcuts. In
that case, it may effectively become a site-level configuration file. It is a text file
with various settings to control the interaction between the integration client, the
operating system, and the SolidWorks session, as well as the configuration of certain
elements of the Graphical User Interface (GUI). Only a small subset of the included
properties is intended for modification by customers.


Teamcenter preferences
o There are several Teamcenter preferences that can have an effect on integration
behavior. These may be managed as user, group, role or site preferences, although by
default most are site preferences. The most commonly encountered scenarios are
explained in this guide, but the Teamcenter documentation provides the most
complete description of these preferences.

By default, all three of the above files are located in the integration‟s client installation directory
(often called SWIM_DIR in various documentation). Both swim.properties and swim.xml may be
read from other locations as well. Swim.cfg is only read from the client‟s installation directory.

Swim.properties
The swim.properties file, located in the installation directory, contains the preferences that can
be configured for a site or for an individual user. All of these preferences are optional.
Preference files may be named either swim.properties or .swimrc and may be placed in any of
these locations:




In the working directory where the Teamcenter Integration for SolidWorks is started.
In the user‟s home directory.
In the Teamcenter Integration for SolidWorks installation directory.

When the Integration starts, it reads all swim.properties and .swimrc files in these locations.
If several files specify the same preference, the preferences from the working directory take
precedence over those from the user‟s home directory, and preferences from the user‟s home
directory take precedence over those from the installation directory. Preferences that are likely
to have the same definition for all users should be specified in the installation directory, while a
user‟s personal customizations may be specified in the home directory or working directory
preferences file.
It is recommended that the Teamcenter administrator maintain the installed swim.properties file
as a read-only master copy, and make all changes in a separate file, which is included in
swim.properties using the preferences.file setting, as in this example:
preferences.file = .\\swim_site.properties
This technique allows you to override each preference‟s default value, while preserving the
original unchanged value for documentation. It also helps to quickly identify those preferences
whose values have been changed by the site.
Special syntax is available for “locking” settings so that users cannot override them, and for
resolving values through environment variables (especially useful for settings that point to
2

directory or file locations). This syntax is explained at the top of the swim.properties file, and so
it is not repeated here.
Any of the published configuration settings may be overridden in the swim.properties file, but
some are more frequently changed than others. The following is a summary of the more
commonly modified settings.

General preferences
table.columns.std:

With the default value, the integration displays the most
commonly needed attributes of the CAD models. It is
possible to display additional or alternative attributes, either
by selecting from a predefined set (documented in
swim.properties) or by configuring display of custom
columns. The attributes included in table.columns.std
apply to all integration dialogs, unless overridden by
similar dialog-specific preferences, such as
table.columns.checkin and table.columns.update.

log.file

The integration automatically writes a log file to the
session‟s startup directory, which may be influenced by
several factors including the configuration of desktop
shortcuts. Assuming that all users have write access to a
consistent location on their client workstations, it is
recommended to set log.file to a consistent value for all
users, such as c:\\temp\\txdlog.txt.

log.suppress

The default setting for this option is 3, which includes the
most important information needed for troubleshooting. In
rare cases it may be necessary to increase the level of
logging detail. This may be done by setting log.suppress
to any value greater than 10000.

iman.autorename.itemname

True

summary.table.rows.std

This preference controls the attributes which are displayed
in the Summary panel on the Open, Open Dependencies,

by default, this setting controls whether a CAD
model‟s item name attribute is updated to match its item
ID, when the item ID is changed during save to
Teamcenter. It is recommended to assign item IDs from
Teamcenter during save, and to allow the integration to
rename the CAD files to match the item IDs. This ensures
uniqueness at both the item and the dataset levels, which is
important for performance and reliability. By changing this
setting to false, the original name of the CAD file can be
preserved in the item‟s Name attribute, to retain association
with the design intent of the CAD model in the Teamcenter
database.

3

and Update dialogs. The swim.properties file
documents a predefined list of keywords that may be used
to add or change the set of displayed attributes. In addition,
any Teamcenter attribute (out of the box or custom) may be
added to the set by first configuring the attribute as a
mapped column (see the section on column mapping, later
in this document) and then adding the column map‟s
display_name value to summary.table.rows.std.

Open preferences
filters.checkout.choices

Filters are check boxes that appear on the integration‟s
Open Dependencies dialog. They give the SolidWorks
designer control over how much CAD data is downloaded
from Teamcenter to his client. A subset of the available
filters is displayed by default. Filter options can be added
or subtracted by modifying this preference.

filters.checkout.default

Once the available filters are configured, it is advisable to
set them to the appropriate default true or false values, so
that the initial collection of models displayed in the Open
Dependencies dialog represents the most commonly
desired set of dependencies. Users can change and apply
filter options in the Open Dependencies dialog, but each
change requires the integration to recalculate the
dependency tree, and this can take significant time for very
large structures. Filter options that are included in the
filters.checkout.default preference are set to true by
default; filters not mentioned in this preference default to
false.

checkout.exportdirectory

If this preference is not set, then the initial value of Work
Folder in the Open Dependencies dialog is determined by
the SolidWorks session‟s current working directory. If the
user changes his SolidWorks directory, the next export
from Teamcenter will be routed to a different location on
his client. The result is little or no consistency in the
location of managed Teamcenter files. For this reason, it is
recommended to set checkout.exportdirectory to a
fixed location. The syntax documented in the
swim.properties file may be used to read an environment
variable as part of the path, for example:
checkout.exportdirectory=${USERPROFILE}\\sw.

iman.bomrevisionruledefault

When this preference remains unset, the default revision
rule that is applied to the operation is determined by the

4

user‟s Default Revision Rule setting, in the Rich Client‟s
Options | Product Structure dialog. Customers may
want to configure a different revision rule as the default for
SolidWorks users, and this can be done by setting
iman.bomrevisionruledefault to the name of any revision
rule defined in Teamcenter. It is important to configure a
default revision rule that is appropriate for most users, most
of the time, because this rule will always be used to
configure the selected top-level model during Open. The
user will have an opportunity to select a different rule after
the “Open Dependencies” dialog is displayed, but applying
the alternative rule requires additional processing on the
client and server, which takes additional time.

Save preferences
checkin.after

This setting controls the default value of the Work Folder
After Save control on the save dialog. Some customers
may wish to change this default so that users do not have to
remember to do it themselves, during each save operation.

eai.jtenabled

When the SolidWorks translator is installed, the integration
can call the translator to create JT files during save to
Teamcenter, and then automatically upload the resulting JT
files into the Teamcenter Bill of Materials. The translation
is controlled by a check box on the save dialog, labeled
Save JT Files. Because client-side JT translation can
have a significant impact on save performance,
Administrators may wish to disable this function by
default, and this is done by simply changing the preference
value from true to false.

iman.addonlynewtoselected

By default, all new items are put into a Teamcenter folder.
If the user selects a folder in the save dialog, then the items
are put into that folder. If he does not explicitly select a
folder (this is done by selecting the top-level Teamcenter
folder in the folder selection dialog, as shown below)

5

then the location of the newly-created items is controlled
by the WsoInsertNoSelectionsPref preference in
Teamcenter. Setting the iman.addonlynewtoselected
preference to false tells the integration that not only new
items, but also existing items being saved as new versions
or new revisions, should be put into the destination folder.
This creates links in Teamcenter such that a given item may
belong to multiple folders. A typical use case for this is to
collect all the components for a large assembly structure
into a single folder, so that Teamcenter users can easily
find them together.
checkin.ignoremissing

Customers often have CAD assemblies which contain
references to other models that are no longer used by the
assembly, or that are not available in session. When an
assembly is saved to Teamcenter, the integration will find
and report these as missing references, and will ask the user
whether to continue with the save. Another scenario in
which the warning dialog appears is when the assembly has
suppressed components that have not already been saved to
Teamcenter. Some customers have so much data with this
condition that they prefer not to see the warning dialog on
each save, and this can be configured by changing the
preference from prompt to always.

sw.configurations.default

With the default value of “all”, the integration will attempt
to manage all referenced and explicitly added
configurations as distinct items and datasets in Teamcenter.
Customers who do not have naming conflicts in their CAD
data can accept the default setting, but many customers

6

who are migrating SolidWorks from other PDM systems,
or from disk, where naming conflicts exist and are
tolerated, may wish to change this setting to “none”. When
set to “none”, the integration will ignore configurations
within documents, and will save only the documents to
item IDs and datasets in Teamcenter. Configurations are
still available within the SolidWorks session, because they
are embedded within the .sldasm and .sldprt CAD files
managed by Teamcenter. The most significant
consequence of choosing to hide configurations in this way
is that they are not visible within Teamcenter and therefore
cannot appear as assembly components within the
Teamcenter Bill of Materials.
sw.configurations.hide

Similar to sw.configurations.default, this setting will
prevent Teamcenter from saving configurations as items.
However, it is not a global setting but instead is a list of
specific configuration names (wildcards may be used)
which should be hidden. Customers who use a consistent
naming convention for non-product or prototype
configurations should use this setting to hide those
configurations from Teamcenter.

sw.configurations.masters

SolidWorks itself creates a master configuration, named
“Default”, for each document, unless configured otherwise.
This setting should contain the names of all master
configurations used by the site. For example, a site running
in the French locale may have configured SolidWorks to
create master configurations as “Défaut”. Such a site
should set sw.configurations.masters = Défaut.

sw.configurations.master.document.same Instead of using a consistent name, or set of names,
for master configurations, some customers have named
their master configuration the same as the document which
contains it. In such cases, the default setting for this
preference should be retained. If configurations named the
same as the document are not intended to represent the
master configuration, then this setting should be changed to
“false”, and during save to Teamcenter the users will be
required to rename either the document or the same-named
configuration.

Update preferences
update.autoclose

This preference applies only to the Update Directory
function. The RMB Update Model function dialog always
closes automatically after the operation is finished.

7

update.autoclose is set to “false” by default, so that the
Update Directory dialog remains open. Some customers
may want to change this setting to “true”, so that the dialog
is automatically dismissed.

swim.xml
The swim.xml file, located in the installation directory, tells the Integration how to map
SolidWorks properties to Teamcenter attributes, which BOMs to create when a model is saved to
Teamcenter, and which Teamcenter dataset and named reference types to use for SolidWorks
models. It is an XML file that uses the DTD defined in swim.dtd, also located in the installation
directory. You may choose to modify swim.xml, or you can create another map file as long as
the map file conforms to the swim.dtd definition. If you choose to create another map file, set
the map.file user preference to define the path to it, and place a copy of swim.dtd in the same
directory as the new map file. The swim.dtd file should not be modified.

Attribute Mapping
When a model is exported from Teamcenter and opened in SolidWorks, attributes assigned to the
item, item revision, dataset, or forms may be copied to attributes in the SolidWorks model.
When a model is saved from SolidWorks to Teamcenter, its property values may be copied back
to these objects. To configure the attribute mapping a site must add attribute_map tags to the
swim.xml and load those mappings into Teamcenter. Once configured the attribute_map tag
specifies which attributes should be copied for a particular type of SolidWorks model. Within an
attribute_map definition can appear zero or more attribute definitions. Each attribute
definition specifies the name of a property in the SolidWorks model (this is the attribute‟s CAD
name), the name of the corresponding attribute in Teamcenter (its PDM name) and additional
information describing its default value, what to do if the attribute does not exist, and so on. The
attribute‟s CAD name and PDM name must be specified, and they must be the first and second
tags, respectively, in an attribute definition. The other elements of an attribute definition are
optional and may appear in any order.
For example, here is an attribute map for SolidWorks assembly and part models:










1.0





8

The cad_type defines the type of SolidWorks model to which this map applies. The allowed
cad_type values are the six-letter extensions that SolidWorks uses to identify its model files, in
this case “sldasm” for assemblies and “sldprt” for part models. If more than one type is
specified, use a colon to separate the type names. Additional cad_type values of “slddrw” for
drawings and “sldtbx” for toolbox parts may be used.
The example above specifies only two attributes to be mapped between Teamcenter and
SolidWorks. One is the part number, which the map says is in a property named PartNumber in
SolidWorks assembly and part models, and is the item ID in Teamcenter items. The other is the
weight of the assembly or part, which is in a SolidWorks property named Weight and in an
attribute named wgt in the item revision master form. The part number is copied only from
Teamcenter to SolidWorks (the direction is pdmtocad), while the weight is copied only from
SolidWorks to Teamcenter (the direction is cadtopdm). A property for the part number will be
created if it does not exist in the SolidWorks model (if the missing_attribute_action is
create). If the weight does not exist in the SolidWorks model, a default value of 1.0 will be
stored in the form attribute (this is specified by the default tag).
Each attribute tag is a single mapping of SolidWorks property and Teamcenter attribute. A
property can be mapped to multiple attributes by adding additional attribute tags for each
mapping. Similarly, an attribute can be mapped to multiple properties by adding additional
attribute tags. The integration does not validate multiple mappings; each mapping is performed
without respect to any rules. It is a site administrator‟s responsibility to establish a useful set of
mappings.
The tags that can be used in an attribute definition are described below. Some of these
descriptions refer to source and destination attributes. When opening a model, the source
attributes are those in Teamcenter and the destination attributes are the properties in SolidWorks.
When saving a model, the source attributes are the properties in SolidWorks and the destination
attributes are those in Teamcenter.
cad_name


The cad_name tag specifies the attribute‟s name in the SolidWorks model, which should be the
name of a custom property in the SolidWorks document. The cad_name tag is required and it
must be the first tag in an attribute definition. It has no default.
The following attribute function may be used instead of a property name, but only when
direction is "cadtopdm".
is_configuration()

The attribute value is true if the SolidWorks model is a
configuration. The value is false if the model is a document.

pdm_name


The pdm_name tag specifies the attribute‟s name in Teamcenter. This name can be a keyword for
certain special attributes, or it can be a more general expression that gives the attribute‟s name
and the class and type of object where the attribute can be found.

9

When only a single keyword is given for the value of the pdm_name, it may be one of the
following:
dataset_desc

The attribute is the dataset description.

item_desc

The attribute is the item description.

item_name

The attribute is the item name.

item_id

The attribute is the item ID.

item_revision_id

The attribute is the revision.

item_revision_desc

The attribute is the revision description.

item_type

The attribute is the item type. Since an item‟s type cannot change
after the item has been created, this is ignored when copying
attribute values to an existing item.

To specify attributes other than the special ones listed above, use the notation class.name for the
pdm_name value, where class indicates where the attribute will be found, such as on an item, and
name is the name of the attribute. The classes of Teamcenter objects currently supported are:
Dataset

The attribute is a dataset property.

Item

The attribute is an item property.

Item Master

The attribute is one of the form properties in the item master. Note
that there is a single space in this class name.

Item.Form

The attribute is a property in a form attached to an item. The form
must be based on a POM class derived from the Form class. If
more than one form is attached to an item, the first one that matches
the class and type (see below) is used. Forms that are stored as files
are not supported.

ItemRevision

The attribute is an item revision property.

ItemRevision Master

The attribute is one of the form properties in the item revision
master. Note that there is a single space in this class name.
ItemRevision.Form

The attribute is a property in a form attached to an item revision.
The form must be based on a POM class derived from the Form
class. If more than one form is attached to an item revision, the
first one that matches the class and type (see below) is used. Forms
that are stored as files are not supported.

For example, to specify the project_id attribute in the item revision master form, the name
would be


An optional type can be specified using the notation class:type.name. An attribute
object_desc that will be used only for items of type Part would be named


10

Types may also be included in the compound notation used to specify a general form attribute.
For example, suppose items of type Part can have a form of type PartData. An attribute data1
in a PartData form would be named


When using the class.name or class:type.name notation, name must be the attribute‟s real
property name, not its display name. You can find the real name of an attribute with the
Teamcenter BMIDE application. Under POM_application_object, look for ItemMaster and
ItemVersionMaster to see the attributes of the Item Master and ItemRevision Master classes;
under POM_application_object | WorkspaceObject are the definitions of the Item,
ItemRevision, and Dataset classes.
When a keyword or class.name specification exists for the attribute
you want to map, and when the attribute mapping applies to all
Teamcenter Item types, then you may use the abbreviated syntax. If
you want the attribute mapping to apply to only one, or a subset, of
the available Teamcenter Item types, then you must use the fully
qualified compound notation.
The pdm_name tag is required and it must be the second tag in an attribute definition,
following the cad_name tag. It has no default.
The Teamcenter attributes must be present in the swim_policy.xml or custom_policy.xml. If not
present in either policy file, then the site administrator should add the attribute to the
custom_policy.xml (modification of the swim_policy.xml file is not supported). In the
custom_policy.xml, the attributes should be added under the proper object type as shown below
for an Item.



:
:



Errors or performance degradation can occur if the attributes
referenced as pdm_name are not included in the policy file.
“assert” errors will occur in the txdlog file if an attribute is
missing from the policy file.

default
data

The default tag specifies a default value to assign to the destination attribute when the source
attribute is missing. The value that is assigned to the destination attribute is data. Its type may
be "Double", "Integer", "String", or "Boolean" (note that double quotes are required around
11

the type as shown, but should not enclose data). When the type is "Boolean", data must be
either true or false.
The default tag is optional. If the source attribute is missing and no default is defined, the
attribute is skipped.
missing_attribute_action


The missing_attribute_action tag specifies what to do when the destination attribute is
missing. Its value may be one of the following strings (these strings must be enclosed in double
quotes as shown).
"create"

The destination attribute is created if it does not exist. This is the
default.

"ignore"

The attribute is skipped if the destination attribute does not exist.

The missing_attribute_action tag applies only to SolidWorks properties. It is ignored when
the destination is a Teamcenter attribute. Thus it is only meaningful when the direction value
is “pdmtocad” or “both”.
direction


The direction tag indicates whether to copy the attribute only from Teamcenter to SolidWorks,
only from SolidWorks to Teamcenter, or in both directions. Its value may be one of the
following strings (these strings must be enclosed in double quotes as shown).
"both"

The attribute is copied from Teamcenter to SolidWorks when the
model is opened, and it is copied from SolidWorks to Teamcenter
when the model is saved. This is the default. The integration does
not attempt to modify toolbox parts. If a sldtbx cad_type is
included in a “both” mapping, the attributes will not be mapped
from PDM into the toolbox part.

"cadtopdm"

The attribute is copied only from SolidWorks to Teamcenter when
the model is saved.

"pdmtocad"

The attribute is copied only from Teamcenter to SolidWorks when
the model is opened. The integration does not attempt to modify
toolbox parts. If a sldtbx cad_type is included in a “pdmtocad”
mapping, the attributes will not be mapped from PDM into the
toolbox part.

Note that two attribute definitions can be provided when different behavior is needed for each
direction in which the attribute is copied. One definition may specify the cadtopdm direction
and the other definition may specify the pdmtocad direction.

12

constraint


The constraint tag restricts attribute copying to models with certain characteristics. Its value
may be one of the following strings (these strings must be enclosed in double quotes as shown).
"any"

There is no restriction on copying the attribute. This is the default.

"master"

The attribute should be copied only if the model “owns” its file,
which in the case of SolidWorks means the model is a document.
Use this constraint value to prevent the attribute from being copied
when the model is a SolidWorks configuration.

"non_master"

The attribute should be copied only if the model does not “own” its
file. Use this constraint value to copy the attribute when the model
is a SolidWorks configuration, and to prevent the attribute from
being copied for SolidWorks documents. This constraint does not
apply to “default” configurations (where “default” is defined by
sw.configurations.masters preference)

"use_default_cfg"

The attribute should always be copied to or from the configurationspecific tab of the model‟s properties. Use this constraint when you
want to ensure that all Teamcenter attributes are accessed from the
configuration-specific tab, whether the model is a document or a
configuration.

"reserved"

The attribute should be copied only if the model is reserved by the
user. Use this constraint value to avoid modifying models that
cannot be checked in. This constraint applies only to the pdmtocad
direction. It is ignored when attributes are copied from SolidWorks
to Teamcenter.

The constraint tag may be used more than once. For example, to make sure an attribute is
copied only to models that are checked out for modification, and not copied to a SolidWorks
configuration, use two constraint tags:



truncate


The truncate tag specifies whether an attribute should be truncated when mapping from CAD
to PDM. Should a SolidWorks property be of greater length than the corresponding Teamcenter
attribute, the attribute can be truncated to the length of the Teamcenter attribute.
"true"

Truncate the attribute prior to writing to Teamcenter.

"false"

Default value. The attribute is not truncated before writing to
Teamcenter. If attribute is too long, an error will occur and the save
will be stopped.

13

If an error occurs, the user should correct the attribute length and
re-save all data again, not just the model that had the attribute
problem, as some of the data may not have been saved.

Loading the Attribute Mappings into Teamcenter
The attribute mappings defined by the attribute_map tag in the swim.xml must be defined in
Teamcenter too. Follow the procedure “Loading the Attribute Mappings” defined in the “PostInstallation Configuration” section of the InstallationGuide.pdf. When performing those steps,
use the swim.xml file that contains the attribute mappings.

User Defined Columns
User defined columns are used to display attributes in the Integration‟s dialogs which are
associated to the item, item revision, dataset, or forms, and parameters in SolidWorks which
have not been predefined by the Integration. They can be added to the swim.properties file for
any table.columns.* preference. For example, the following preference value in the
swim.properties defines two user defined columns to be displayed for standard columns:
table.columns.std = itemid:itemtype:itemrev:itemname:
UserDefinedCol1:UserDefinedCol1:datasettype:cadname

where UserDefinedCol1 and UserDefinedCol2 are defined in the Column Map
Column Map
Within a column_map definition can appear attribute definitions. Each attribute definition
specifies the name of a property in the SolidWorks model (this is the attribute‟s CAD name), or
the name of an attribute in Teamcenter (its PDM name). The attribute‟s CAD name or PDM
name, but not both, must be specified in a column_map definition.
The column_map tag tells the integration about columns to be displayed in the dialogs. A
column_map tag contains one or more column tags. Each column definition specifies a tag
associated with a preference value defined in the swim.properties file. The display_name tag
tells the integration what to display in the column header. The cad_name tag specifies the name
of a property in the SolidWorks model (this is the attribute‟s CAD name) and the pdm_name tag
specifies the name of the corresponding attribute in Teamcenter (its PDM name).
For example, here is example of a column map:










14



The example above specifies two column maps. The first, named “UserDefinedCol1” is a
SolidWorks weight parameter named Weight with column heading of "Item Weight”. The other
column, “UserDefinedCol2”, is a Teamcenter attribute named “color” on the item revision
master form with column heading of "PDM Color”. The tags that can be used in a column
definition are described below.

column tag


The column tag specifies the name to be used in the preference value in the swim.properties file.
For example, if the name is “UserDefinedCol1” then the name in swim.properties must match
and must be unique for the column map. Below is an example:
table.columns.std = itemid:itemtype:itemrev:itemname:
UserDefinedCol1:datasettype:cadname

display_name


The display_name tag specifies the column description.

cad_name


The cad_name tag specifies the property‟s name in the SolidWorks model, or it may be the name
of an attribute function. If the cad_name tag is defined then the pdm_name tag cannot also be
defined. If it is the name of a property, it must obey the usual rules for SolidWorks property
names.

pdm_name

The pdm_name tag specifies the attribute‟s name in Teamcenter. If the pdm_name tag is defined
then the cad_name tag cannot also be defined. This name can be a keyword for certain special
attributes, or it can be a more general expression that gives the attribute‟s name and the class and
type of object where the attribute can be found. Both the keyword and the general expression
syntax are the same as documented for the pdm_name tag in the attribute mapping section of this
document.

15

BOM Map
The bom_map tag defines the view type for the BOMs that the Integration must update each time
it saves a SolidWorks model in Teamcenter. It has the following format.


.
.
.


BOM View Type
Each bom_line tag specifies the type of BOM view that must be created or updated whenever a
SolidWorks model is saved. Both parent and child must be SolidWorks model types defined by
entity tags in the type_map. The parent is the type of model for which the BOMs are being
created. The child is the type of model that will appear on the BOM line. The parent is a model
that depends on the child. The type is the type of BOM that should be given a BOM line for the
child when the parent model is saved to Teamcenter.
For example, the following bom_map defines three BOM lines, one for assembly-to-assembly
relationships, one for assembly-to-part relationships, and one for assembly-to-toolbox part
relationships. The first bom_line tag states that, when an assembly model (parent_type)
depends on another assembly model (child_type), the item revision containing the parent
model should be given a BOM of the view type. The second bom_line tag makes a similar
statement about the BOM to add to an assembly item revision that depends on a part model.















BOM Properties
A bom_line tag may optionally enclose several bom_prop tags, each of which specifies a
SolidWorks component property to be mapped with an occurrence attribute on the BOM line.
The bom_prop tag contains a direction for the mapping. The component reference property is the
only supported SolidWorks property. This property can be shown in drawing annotations, such
as tables or balloon notes. Any Teamcenter BOM line property can be supported. The

16

bom_prop

tag can be repeated to establish multiple mappings. One-to-many mapping can be
used in the cadtopdm direction, but not in the pdmtocad direction.
Every bom_prop tag has the following structure


cadName

pdmName

direction

The name of the property on the SolidWorks component pointer.
“ComponentReference” is the only supported value and it is only
supported for SolidWorks 2010 and beyond.
The name (not display name) of the Teamcenter bomline attribute. For
example “bl_sequence_no” is the name of the attribute displayed as
“findno”. All bomline attributes are supported.
Value indicating when the properties should be mapped. Allowed values
are “both”, “pdmtocad”, and “cadtopdm” If “both”, then the property will
be set in Teamcenter during save and in SolidWorks during open. If
“pdmtocad”, then the property will be set in SolidWorks during open. If
“cadtopdm”, then the property will be set in Teamcenter during open.

By default, bom_prop tags are set in the swim.xml file. Cadtopdm mappings occur on every
save. Pdmtocad mappings only occur when the assembly is opened from Teamcenter using the
Synchronize BOM Attributes checkbox on the open dialog.
If using BOM packing in the Structure Editor, the packing will be
affected by pdmtocad mapping of bl_sequence_no. In some cases
portions of a bom could become packed or unpacked unexpectedly.
When mapping in the cadtopdm direction, the BOM attributes must
be writeable. If not writeable, the save operation will fail resulting
in corrupted data in Teamcenter. At a minimum, the BVR will be
missing. The integration assumes access to all attributes, as
verification of the attribute on every BVR would be a significant
performance impact.
String attributes being mapped cadtopdm will be truncated if the
value in cad is greater than the maximum length of the attribute.
Drawing annotations which reference the component reference
property will not automatically update if “Load referenced
documents” is set to “None”. “Load referenced documents” is a
SolidWorks system option, which can be found on the Tools |
Options | System Options | External References dialog.
If any BOMLine properties are configured as either source or destination in the bom_prop tag of
swim.xml, those properties should be present in the swim_policy.xml or custom_policy.xml. If
not present in either policy file, then site administrator should add the property to the

17

custom_policy.xml (sites should not modify the swim_policy.xml). In the custom_policy.xml,
the properties should be added under ObjectType name=”BOMLine” as shown below.



:
:



Errors or performance degradation can occur if the BOMLine
properties referenced as pdmName are not included in the policy
file. “Assert” errors will occur in the txdlog file if an attribute is
missing from the policy file
In each bom_prop tag, the pdm_name must be the actual name of the bomline attribute. In the
example above, the ComponentReference property in SolidWorks is mapped to the
bl_sequence_no attribute in the Teamcenter BOM. The displayable name for bl_sequence_no is
“Find No”. However the actual database name “bl_sequence_no” must be used in the BOMLine
mapping1.

Auxiliary Files
When a model is saved to Teamcenter, additional local files may be saved with it. These files
may also be fetched from Teamcenter when the model is fetched. These additional files are
called auxiliary files. Examples of auxiliary files are JT files for the Teamcenter Rich Client
Viewer, GIF image files, and files of NC machining instructions. The auxiliary_file_map tag
tells the Integration about auxiliary files to save or fetch with SolidWorks models.
An auxiliary_file_map tag contains one or more auxiliary_file tags. It may also contain
jt_file tags, which are described in a later section on JT Files. The general purpose
auxiliary_file tag specifies a pattern for the name of a file, the dataset type and named
reference type where the file will be stored in Teamcenter, and optional commands for the
operating system to execute. It may also specify a checkbox to display in the Save dialog for
users to choose whether auxiliary files should be saved.
General Auxiliary Files
The auxiliary_file tag supports most kinds of auxiliary files. Each is associated with a
particular type of SolidWorks model. When a model of that type is saved to Teamcenter, the
Integration will also save any local files that match a specified file name pattern. When the
model is fetched from Teamcenter, these files can also be fetched.
For example, here is an auxiliary file map containing a single auxiliary_file tag for JT files.2
The cad_type="sldprt" attribute means this auxiliary file definition is associated only with
part models:

1
2

See the Teamcenter documentation for more details on displayable names versus database names.
The jt_file tag, described later, is an easier way to handle JT files.

18










The pdm_location tag tells the Integration where to put the auxiliary file in Teamcenter. In the
example above, the file will be stored in a dataset of type "DirectModel" and the file‟s named
reference will be "JTPART". The dataset is assumed to have the same name as the SolidWorks
model‟s dataset. If the dataset does not exist, it will be created and attached to the model‟s item
revision with an "IMAN_Rendering" relation.
The file_name tag tells the Integration how to find the auxiliary file in the local file system. In
the example above, the name of the auxiliary file is composed of the model‟s lower-case name
with a .jt extension. It is not an error if an auxiliary file cannot be found.
An optional operating system command can be specified with the os_command tag. In the
example above, the Integration will tell the operating system to execute a command named doit,
which takes the path to the model‟s file as its sole argument. Commands are executed after
SolidWorks writes models to the local file system, but before the models or auxiliary files are
saved to Teamcenter.
If an error occurs while attempting to execute the command, the
auxiliary file will not be checked-in to Teamcenter.
The cadtopdm_control tag defines an optional checkbox to display in the Save dialog‟s
Auxiliary Files box. In this example, the checkbox label will be Save JT Files. This tag also
defines a user preference named eai.jtenabled that sets the default state of checkbox. In this
case, the checkbox is on by default.
The tags that can be used in a general auxiliary_file definition are described in more detail
below.

auxiliary_file

optional elements


The auxiliary_file tag is the general purpose definition of an auxiliary file. The cad_type
defines the type of SolidWorks model to which the auxiliary_file tag applies. The allowed
values for type are the six-letter extensions that SolidWorks uses to identify its model files. For
example, cad_type="sldprt" means the auxiliary file is associated only with part models.
More than one SolidWorks model type may be given for cad_type. Use a colon to separate each
six-letter value from the next. For example, to indicate that an auxiliary_file tag applies to
parts, assemblies, and drawings, the attribute should be cad_type="sldprt:sldasm:slddrw".

19

The direction attribute indicates whether to save the file to Teamcenter when the SolidWorks
model is saved, fetch it from Teamcenter when the model is fetched, or both. Its value may be
one of the following strings (these strings must be enclosed in double quotes as shown).
"both"

The auxiliary file is saved to Teamcenter when the SolidWorks
model is saved, and it is fetched from Teamcenter when the model
is fetched.

"cadtopdm"

The auxiliary file is saved to Teamcenter when the SolidWorks
model is saved, but is not fetched with the model. This is the
default.

"pdmtocad"

The auxiliary file is fetched from Teamcenter with the SolidWorks
model, but it is not saved when the model is saved.

The optional elements that can be included in an auxiliary_file definition are described
below.

cadtopdm_control


The cadtopdm_control tag creates a checkbox in the Save dialog that allows the user to choose
whether to save the auxiliary files specified by the auxiliary_file definition. The text
labeling the checkbox is label. If the same label is used for several auxiliary_file definitions,
a single checkbox can control all of them.
The user_preference_name attribute creates a user preference name that can be used in the
swim.properties file to set the initial state of the checkbox. When the user preference is not
set, the checkbox is initially checked or unchecked according to whether
user_preference_default is true or false.
If an auxiliary_file definition has no cadtopdm_control tag, the auxiliary files are always
saved.
The direction attribute on the auxiliary_file definition must
be "cadtopdm" or "both" for the cadtopdm_control tag to have
any effect.

create_text_file


The create_text_file tag specifies one or more text files to create. By default, the file(s) will
be created after SolidWorks has saved the models to the local file system, but before the models
or auxiliary files are checked-in to Teamcenter.
If an error occurs while attempting to write a text file, the file will
not be checked-in to Teamcenter.
The file to be created is specified by the file_name attribute, where path is the path to the file.
The path may include keywords described in the section on Substitution Keywords. If
20

separate_files is true, a separate text file will be created for each model saved to Teamcenter.
If separate_files is false, a single file will be created, which may contain information about

all models saved to Teamcenter.
Each text file is composed from three templates: the header, the body, and the footer. The
header and footer appear once in the output file, at its beginning and end, respectively. The body
appears between these two sections. If a single file is being created for all models, the body is
repeated for each model being saved to Teamcenter. The body appears only once in the output
file if a separate output file is created for each model.
Each template is optional, although at least one must be specified. The header attribute
specifies the path to a text file that will be used as the header template, the body attribute
specifies the path to a text file that will be used as the body template, and the footer attribute
specifies the path to a text file that will be used as the footer template. The paths to these files
may include keywords from the Substitution Keywords section, and the text within these files
may also use these keywords. If separate_files is true, keywords that imply a particular
model, such as {cad_name} and {cad_type}, can be used in any template and in any file path.
If separate_files is false, keywords that imply a particular model can be used only in the body
template and in the path to the body template file. The header and footer, and the file_name
path, can use only keywords that do not refer to a specific model when separate_files is false.
The use of these keywords in the paths to the template files makes it possible to use separate
body templates for parts, assemblies, and drawings, or to use separate templates for SolidWorks
configurations and documents. For example, suppose the C:\text_templates directory
contains a header template file named header.txt with the following contents:
These models are being checked-in to Teamcenter…

and two body template files named sldprt.txt and sldasm.txt, in which sldprt.txt
contains:
A part named {cad_name} is being checked-in to Teamcenter.

and sldasm.txt contains:
An assembly named {cad_name} is being checked-in to Teamcenter.

A create_text_file tag that uses these templates to create a single text file summarizing the
parts and assemblies selected for check-in to Teamcenter might look like this:


When an assembly named Coupling and two parts, Pin and Shaft, are saved to Teamcenter, the
contents of summary.txt would be:
These models are being checked-in to Teamcenter…
A part named Pin is being checked-in to Teamcenter.
A part named Shaft is being checked-in to Teamcenter.
An assembly named Coupling is being checked-in to Teamcenter.

The {cad_type} pattern in the path to the body template would have been replaced with sldprt
or sldasm, depending on the model type, and the {cad_name} pattern in the body templates
would have been replaced by the model name.

21

You can also specify a phase in which the text file(s) will be created. Refer to the os_command
tag for more information concerning the phase attribute. By default, text files are created during
the in_directory phase.

ets_request

value


The ets_request tag submits translation requests to Teamcenter‟s Dispatcher after all models
have been checked in to Teamcenter. The name of the translator that will handle the request,
also known as the service, is given by the required translator attribute. The default provider is
"SIEMENS", but other providers can be specified with the optional provider attribute. The
translation request can be given a priority of 1, 2 or 3, corresponding to high, medium or low
priority, using the priority attribute. If the priority is set to 0, no translation request is
submitted.
By default, the ets_request tag submits a separate translation request for each SolidWorks
model of the specified type that is saved to Teamcenter. However, if the translator can handle
more than one model at a time, you can set the request_per_model attribute to "false", which
will cause one translation request to be submitted containing all models that have been saved to
Teamcenter. For example, if four parts are saved to Teamcenter and an auxiliary_file
definition with a cad_type of "sldprt" specifies an ets_request, four separate translation
requests will be submitted by default or if request_per_model is explicitly "true". If
request_per_model is "false", a single translation request will be submitted containing all
four parts3.
If an auxiliary file definition uses ets_request, the Dispatcher will create the auxiliary file and
import it into Teamcenter, so there is no need to specify a file or a PDM location for it. For
example, an auxiliary file definition that submits a request for translating drawings to DXF files
might look like this:





In this example, the cadtopdm_control tag adds a checkbox to the Save dialog, giving the user
control over whether the DXF file will be created.
If the translator accepts additional options, these can be specified with one or more
translator_option sub-tags. Refer to the documentation for your translator to determine
whether additional translator options are supported, and to find out the names and allowed values
of these options. The name attribute specifies the name of a translator option, and the string to be
assigned to that option is given by value. When request_per_model is "true", value may
include any of the keywords that are described later in the Substitution Keywords section. When
request_per_model is "false", only substitution keywords that do not refer to a specific model
3

The OOTB translators SWToJT and SWToDXF do not accept more than a single model per translation request;
therefore the request_per_model attribute only applies to alternative or custom translators.

22

should be used. Substitution keywords in value are replaced when the request is submitted to the
Dispatcher, not when the translation occurs.
The ets_request tag always submits Dispatcher requests during the in_pdm phase. An
auxiliary_file tag should not have more than one action per phase, so do not use other
in_pdm actions within the same auxiliary_file tag as your ets_request tag. See the section
on the os_command tag for more information on phases.

file_name


The file_name tag identifies the auxiliary file by defining a pattern that matches the file‟s name.
The pattern may give an absolute path to the file, or the path may be relative to the directory
where the SolidWorks model file is saved. The * wildcard character is allowed in the simple file
name part of the pattern, but wildcards are not allowed in directory names. For example,
"myfile.*" and "images/*.gif" are acceptable patterns, but "image*/myfile.*" is not
allowed because a wildcard is used in a directory name.
The pattern may also include certain keywords that the Integration will replace with data from
the model. Keywords can be used anywhere in a pattern, both in the file name part and the
directory parts of a path. The recognized keywords are described later in the section on
Substitution Keywords.
The optional version attribute indicates whether all auxiliary files matching the pattern should
be saved to Teamcenter, or only the file with the latest modification time. The default is "all",
which saves all auxiliary files that match the pattern.
The file_name tag is optional. If it is not included in an auxiliary_file tag, the Integration
will not attempt to find and save an auxiliary file when it saves the corresponding SolidWorks
model, nor will it attempt to execute any operating system commands specified by the
os_command tag.

os_command


The os_command tag specifies one, two, or three optional commands for the operating system to
execute. By default, these commands are executed after SolidWorks has saved the models to the
local file system, but before the models or auxiliary files are checked-in to Teamcenter.
If an error occurs while attempting to execute one of these
commands, the auxiliary files affected by that particular
auxiliary_file tag will not be checked-in to Teamcenter.
The string in cmd="command" is an operating system command that is executed for each
SolidWorks model saved to Teamcenter. The command string may include the same keywords
allowed in the file_name pattern, which are listed in the section on Substitution Keywords.
The strings in pre_cmd="command" and post_cmd="command" are also operating system
commands. The pre_cmd string is executed once, before any cmd strings from any

23

tag are executed (“once” means just once during a Save, Save As, Save All
Checkouts, or Save All command, regardless of the number of models being saved). The
post_cmd string is also executed only once, after all cmd strings from all auxiliary_file tags
have been executed. The pre_cmd and post_cmd strings may also include some of the keywords
described in the Substitution Keywords section, but not every keyword is meaningful in these
command strings. Since pre_cmd and post_cmd are not associated with one specific model,
keywords that refer to a model‟s name, directory, item ID, or other model-specific data, are not
applicable in these strings.
auxiliary_file

If you provide a pre_cmd, cmd, or post_cmd, the Integration requires the command to execute
successfully before it saves the auxiliary file to Teamcenter. If pre_cmd, cmd, or post_cmd fails,
the auxiliary file matched by the file_name pattern will not be saved. Also, if pre_cmd fails,
neither cmd nor post_cmd will be executed.
If an operating system command exits with a non-zero status, the Integration usually assumes the
command has failed. However, if ignore_status="true" is specified, the Integration ignores
exit status and assumes commands always succeed when executed.
You can also specify the phase in which these commands will execute. When the Integration
saves models from SolidWorks to Teamcenter, the models pass through three phases
corresponding to the values that can be assigned to the phase attribute:
in_cad

The models are in the SolidWorks session and have not yet been
saved to the local file system.

in_directory

The models have been saved from SolidWorks to the local file
system, but neither the models nor any auxiliary files have been
checked in to Teamcenter.

in_pdm

All models and auxiliary files have been checked in to Teamcenter.

By default, the commands specified by an os_command tag are executed during the
in_directory phase, which is usually the phase in which you would want to run any translators
that read a SolidWorks file to create an auxiliary file. If you have any batch processes that must
run after models have been checked in to Teamcenter, you might want to use an os_command tag
to launch them during the in_pdm phase. As a point of interest, the ets_request tag submits
translation requests during the in_pdm phase.
You can think of the os_command, create_text_file, and ets_request tags as actions within
an auxiliary_file definition. Each auxiliary_file definition may have one such action per
phase, which means that as many as three os_command tags can appear in an auxiliary_file
definition if each one specifies a different phase. Alternatively, an auxiliary_file definition
could have one create_text_file tag for the in_directory phase, an os_command tag for the
in_pdm phase, and so on.
Every attribute in an os_command tag is optional.

preview_command

24



The preview_command tag specifies one, two, or three optional commands for SolidWorks to
execute. By default, these commands are executed after SolidWorks has saved the models to the
local file system, but before the models or auxiliary files are checked into Teamcenter. The
preview_command tag is similar to the os_command tag except the keyword “built-in
file_name_tag” is added to invoke added functionality by the Integration. You may notice that by
default, the swim.xml file already has these tags:




















generate_command


The generate_command tag specifies one, two, or three optional commands for SolidWorks to
execute. By default, these commands are executed after SolidWorks has saved the models to the
local file system, but before the models or auxiliary files are checked into to Teamcenter. The
generate_command tag is similar to the os_command tag except for the keyword “built-in
file_name_tag”, which is added to the cmd tag to invoke added functionality by the Integration,
and cad_type which is not optional but can only be set to “PDF”. Below is an example of using
these tags to generate PDF files drawings:




25






PDF files cannot be generated for individual part or assembly
configurations. The PDF is generated for the active configuration.
PDF generation is intended for drawings.

pdm_location


The pdm_location tag specifies where an auxiliary file should be saved in Teamcenter.
Auxiliary files associated with a particular model are always saved in the same item revision as
the model, but they can be stored in the model‟s dataset or in a dataset of their own.
The named_ref attribute must always be specified, where ref is the type of named reference to
be used for the auxiliary file. The pdm_type attribute is the type of dataset in which to store the
auxiliary file. The dataset is assumed to have the same name as the dataset holding the
SolidWorks model. If the pdm_type is not specified, the auxiliary file is stored in the model‟s
dataset.
If a dataset must be created for the auxiliary file, it will be attached to the item revision using the
type of relation specified by relation_type. If not specified, the default relation type is
"IMAN_manifestation".
The named_ref attribute is required in a pdm_location definition. The pdm_type and
relation_type attributes are optional.

Substitution Keywords
Patterns of the form {keyword} can be used in the file_name pattern, and in the os_command
and create_text_file tags. The Integration replaces these patterns with appropriate values.
For example, if a model is named widget, the pattern "{cad_name}.gif" will become
"widget.gif" when widget is saved to Teamcenter.
The modifier upper or lower may be appended to any keyword. Use a comma to separate the
modifier from the keyword, without spaces. The {keyword,upper} pattern will be replaced with
a result that is all upper case. The {keyword,lower} pattern converts the result to lower case.
For example, the pattern "{cad_name,upper}.gif" would produce "WIDGET.gif" when the
model‟s name is widget.
The escape modifier can also be appended to any keyword. This modifier causes every
backslash in the result to be replaced with two backslashes. For example, if the
{cad_directory} pattern produces the result "C:\work\latest", the pattern
{cad_directory,escape} will produce "C:\\work\\latest".

26

The recognized keywords are:
{cad_dataset_uid}

The UID for the model‟s Teamcenter dataset, or an empty string if
the dataset does not exist at the time this pattern is replaced. When
this pattern is used in an os_command string, for example, the
dataset might not exist during the in_cad and in_directory
phases.

{cad_directory}

The absolute path to the directory containing the model file4.

{cad_file}

The absolute path to the model file.

{cad_name}

The model‟s name.

{cad_type}

The SolidWorks six-letter model type, such as sldasm or sldprt.

{document_cad_name}

The name of the model‟s SolidWorks document. If the model is a
document, this is the same as {cad_name}.

{group}

The user‟s current Teamcenter group.

{item_id}

The Teamcenter item ID for the model.

{item_name}

The Teamcenter item name for the model.

{item_revision_id}

The Teamcenter item revision ID for the model.

{item_revision_uid}

The UID for the model‟s Teamcenter item revision, or an empty
string if the item revision does not exist at the time this pattern is
replaced. When this pattern is used in an os_command string, for
example, the item revision might not exist during the in_cad and
in_directory phases.

{item_uid}

The UID for the model‟s Teamcenter item, or an empty string if the
item does not exist at the time this pattern is replaced. When this
pattern is used in an os_command string, for example, the item
might not exist during the in_cad and in_directory phases.

{named_ref}

The named reference for the auxiliary file.

{pdm_type}

The Teamcenter dataset type for the auxiliary file. For example, if
the auxiliary file is saved in the same dataset as a SolidWorks
assembly model, the dataset type is SWAsm. For JT files, the
dataset type is DirectModel.

{swim_dir}

The absolute path to the directory where the Teamcenter Integration
for SolidWorks is installed.

{user_id}

The user‟s Teamcenter user ID.

JT Files
4

This keyword can be used only where a single model is implied, such as in the file_name pattern or in the
os_command cmd string. It is not recognized in the os_command pre_cmd or post_cmd strings because
these commands are not executed for each model.

27

The jt_file tag is simpler than the auxiliary_file tag for configuring the Integration to save
JT files.5 The jt_file element shown below in the auxiliary_file_map makes this happen:




This tells the Integration to save a JT file with each SolidWorks part or Toolbox model saved to
Teamcenter (cad_type="sldprt:sldtbx"). For non-Toolbox parts, the JT file must have the
same name as the part and must be in the same directory as the model‟s file. To apply this to
both parts and assemblies, use "sldprt:sldasm" for the cad_type value.
The file_name tag, described previously for general auxiliary files, may also be used within a
jt_file element if the JT file‟s name will not have the same name as the part or will be located
in a different directory.
The presence of a jt_file tag in the auxiliary_file_map makes
the Save JT Files checkbox visible in the Save dialog. When this
checkbox is on, the jt_file tag is enabled and the Integration
saves JT files as directed by the action type. When this checkbox
is off, the jt_file tag is disabled as if action is "none" and save
is "false".
The default state of this checkbox can be set with the
eai.jtenabled user preference. This option and others are
described in detail in the swim.properties file, found in the
directory where the Teamcenter Integration for SolidWorks is
installed.

Template Map
The template_map tag specifies template models, also known as seed models or start models,
that can be copied when a new model must be created. A template will usually be needed when
the Open command attempts to fetch a model from Teamcenter and the model‟s dataset is empty.
When that happens, a template model of the required type will be copied and placed in the
destination directory, and the copy is given the name that the missing model should have had.
The template_map has no effect on the File | New command. It is
only used by commands in the Teamcenter task.
A template_map contains zero or more template tags: