plm xml import export

62
Teamcenter ® 2007 PLM XML Export Import Administration Guide Publication Number PLM00030 B1

Upload: thanassisroumpies

Post on 18-Jan-2016

332 views

Category:

Documents


27 download

DESCRIPTION

The PLM XML Export Import Administration application is used by Teamcenter®administrators who migrate data between Teamcenter and other applications.You use PLM XML Export Import Administration to create transfer mode objectsthat contain rules that configure import or export operations. This simplifies theimport and export process for end users, who can select a transfer mode object whenimporting or exporting data and do not need to know the specific rules the transfermode contains. You do not actually import or export data using PLM XML ExportImport Administration; you use other applications, such as My Teamcenter orProduct Structure Editor.

TRANSCRIPT

Page 1: Plm Xml Import Export

Teamcenter® 2007

PLM XML Export ImportAdministration Guide

Publication NumberPLM00030 B1

Page 2: Plm Xml Import Export

Proprietary and restricted rights notice

This software and related documentation are proprietary to Siemens ProductLifecycle Management Software Inc.

© 2007 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.

All trademarks belong to their respective holders.

2 PLM XML Export Import Administration Guide PLM00030 B1

Page 3: Plm Xml Import Export

Contents

Getting started with PLM XML Export Import Administration . . . . . . . 1-1

PLM XML Export Import Administration interface . . . . . . . . . . . . . . . . . . . . 1-2Basic concepts about PLM XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2Basic tasks using PLM XML Export Import Administration . . . . . . . . . . . . . . 1-5Syntax definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

Working with transfer mode objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

Managing closure rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1Managing filter rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10Managing action rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12Managing property sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13Managing transfer mode objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16Export transfer mode example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18Best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27

Working with transfer option sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

Create transfer option sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2Edit transfer option sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3Delete transfer option sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1

PLM XML/Teamcenter entity mapping . . . . . . . . . . . . . . . . . . . . . . . . . . B-1

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Index-1

Figures

2-1. Closure rule analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30

Tables

1-1. Before you begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-12-1. Closure rule syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22-2. Property set syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-143-1. Transfer option set items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1B-1. PLM XML/Teamcenter entity mapping . . . . . . . . . . . . . . . . . . . . . . . . B-1

PLM00030 B1 PLM XML Export Import Administration Guide 3

Page 4: Plm Xml Import Export
Page 5: Plm Xml Import Export

Chapter

1 Getting started with PLM XMLExport Import Administration

PLM XML Export Import Administration interface . . . . . . . . . . . . . . . . . . . . 1-2PLM XML Export Import Administration menus . . . . . . . . . . . . . . . . . . . 1-2PLM XML Export Import Administration buttons . . . . . . . . . . . . . . . . . . 1-2

Basic concepts about PLM XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2Using the Tc PLM XML schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3Exporting and importing using PLM XML . . . . . . . . . . . . . . . . . . . . . . . . 1-3Using Teamcenter to export and import data with PLM XML . . . . . . . . . . 1-4

Basic tasks using PLM XML Export Import Administration . . . . . . . . . . . . . . 1-5

Syntax definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5

PLM00030 B1 PLM XML Export Import Administration Guide

Page 6: Plm Xml Import Export
Page 7: Plm Xml Import Export

Chapter

1 Getting started with PLM XMLExport Import Administration

The PLM XML Export Import Administration application is used by Teamcenter®administrators who migrate data between Teamcenter and other applications.You use PLM XML Export Import Administration to create transfer mode objectsthat contain rules that configure import or export operations. This simplifies theimport and export process for end users, who can select a transfer mode object whenimporting or exporting data and do not need to know the specific rules the transfermode contains. You do not actually import or export data using PLM XML ExportImport Administration; you use other applications, such as My Teamcenter orProduct Structure Editor.

Table 1-1. Before you begin

Prerequisites To use PLM XML Export Import Administration, you shouldknow:

• Specific Teamcenter applications.

You must understand the specific application you intend toimport or export data from. For example, My Teamcenter,Product Structure Editor, and Manufacturing StructureEditor are three of the applications that use PLM XML.Each of these applications manages and transforms differentTeamcenter data for different purposes.

• The Teamcenter data model.

You must understand the Teamcenter data model, includingthe overall data that is stored. For example, some of thedata stored are items, item revisions, and forms, along withthe constructs holding the data such as classes, attributes,types, properties, and relations. Each application managesand transforms data within these representations. To seeclass, attribute, and type information, use the BusinessModeler IDE.

• Persistent and run-time objects.

You should know the difference between persistent datastored in the database and objects that are created throughthe application layer at run time.

• The PLM XML schema.

PLM00030 B1 PLM XML Export Import Administration Guide 1-1

Page 8: Plm Xml Import Export

Chapter 1 Getting started with PLM XML Export Import Administration

Table 1-1. Before you begin

You must understand the PLM XML industry standardschema. This allows you to understand the XML-formattedneutral representation and organization of the data forimport and export to Teamcenter.

EnablePLM XMLExport ImportAdministration

You do not need to enable PLM XML Export ImportAdministration before you use it. However, your access maybe restricted even if you have administrator privileges. If thisoccurs, see your system administrator.

ConfigurePLM XMLExport ImportAdministration

You do not need to configure PLM XML Export ImportAdministration before you use it.

Start PLM XMLExport ImportAdministration

Click PLM XML Export Import Administration in thenavigation pane.

PLM XML Export Import Administration interfaceThe PLM XML Export Import Administration interface is the standard rich clientinterface.

PLM XML Export Import Administration menus

All PLM XML Export Import Administration menus are standard Teamcenter richclient menus. For more information, see the My Teamcenter Guide.

PLM XML Export Import Administration buttons

All PLM XML Export Import Administration buttons are standard interface buttons.

Basic concepts about PLM XMLPLM XML is a data (and metadata) representation for the exchange of product lifecycle information. It is a W3C standard supported by multiple XML schemas. ThePLM XML schemas and documentation enable you to introduce PLM XML supportinto your applications. Data represented in the schemas include product structure,geometry, visualization, features, application associativity, data ownership, anddelta (change). Several dominant schemas include:

• Base

Core PLM XML schema markup

• MRO

In-service product data

1-2 PLM XML Export Import Administration Guide PLM00030 B1

Page 9: Plm Xml Import Export

Getting started with PLM XML Export Import Administration

• Delta

A change to be applied to a PLM XML file

• Annotation

PMI, GD&T, and markup

• PDM

Product data management (PDM) schema (workflow, revision rule, form, folder)

• MPM

Manufacturing process management

The PLM XML schemas are published here:

http://www.plmxml.org

They can be freely downloaded for development of collaborative interoperableapplications.

Using the Tc PLM XML schema

Tc PLM XML is a PLM XML schema especially designed to work with TeamcenterData Exchange. You use Tc PLM XML and transfer option sets with Data Exchangeto move data between Teamcenter and Teamcenter for enterprise knowledgemanagement (Teamcenter Enterprise) sites. For more information about DataExchange, see the Teamcenter Data Exchange Guide.

To assist you with mapping Teamcenter objects to Teamcenter Enterprise objectsand vice versa, Siemens PLM Software provides mapping control files, which youcan adapt for modifications made at your site. For more information about mappingcontrol files, see the Teamcenter Data Exchange Guide and the Business ModelerIDE Guide.

Exporting and importing using PLM XML

PLM XML supports the export and import of Teamcenter objects, such as items,datasets, BOMs, forms, and folders, as well as system data, such as business rules,organization data, type definitions, lists of values, and saved queries.

In PLM XML Export Import Administration, you create transfer mode objects thatdefine the import or export context by applying closure (traversal) rules, filter rules,action rules, and property set rules to the input or output of objects and system data.These rules can be a static set stored in the database or they can be applied only to aspecific session. Rules stored in the database can be imported and exported.

When you export a structure using PLM XML, you can perform an incrementalexport, which exports only the data that changed in the structure since your lastexport. You select this option at the time you export the structure.

PLM XML Export Import Administration also references Extensible StylesheetLanguage Transformations (XSLT) files that describe how to transfer the source treeor data structure of an XML document into the result tree for a new XML document,which may be completely different in structure, and can be stored with the transfermode objects and applied as a post-export or pre-import operation.

PLM00030 B1 PLM XML Export Import Administration Guide 1-3

Page 10: Plm Xml Import Export

Chapter 1 Getting started with PLM XML Export Import Administration

Note

The PLM XML framework does not support XSLT file validation; therefore, itis the implementor’s responsibility to ensure valid XSLT format.

A product data management (PDM) system is used to store and retrieve data withina certain context. The context helps define how the data is used, filtered, andtransformed. To accomplish this, the PDM system must have the capability to exportand import data. In Teamcenter, this is done using the PLM XML import exportframework with the various applications written to capitalize on this layer.

One important aspect of data translation is that each translation has a uniquepurpose and scope. The purpose is associated to a business function and theapplication-specific interaction with the PDM. Each instance of a translation isunique and different. A translation must be managed to support its mode of transfer,the traversal of data desired, the filtering of the data to be done and actions to applyto the translation. The PLM XML import export framework supports these uniquetranslations.

Another important aspect of data translation is managing the mapping between thePDM data and the PLM XML standard entity schema for reading the data in and out.In the PLM XML import export framework, data entities are mapped using a knownset of correspondence, where most data is automatically translated by the PLM XMLimport export module. The PLM XML import export module supports applicationextensibility for additional data translations. The mapping between PLM XMLentities and Teamcenter entities is shown in PLM XML/Teamcenter entity mapping.

Using Teamcenter to export and import data with PLM XML

Once you create the transfer mode object in PLM XML Export ImportAdministration, you can use the rich client, thin client, or a command line utility toimport or export data. For more information on how to do this, see:

• Rich client

My Teamcenter Guide

• Thin client

Thin Client Interface Guide

• Command line utilities

Utilities Reference

Note

If you are importing a named reference and the named reference XML filename and subfolder name are different, import it with the plmxml_importutility instead of the rich client. If the file name and the subfolder name arethe same, you can use either the utility or the rich client.

If the transfer mode object does not exist, you can create it with the PLM XMLExport Import Administration application, which is described in this manual. Youcan also use Integration Toolkit (ITK) programming to create transfer mode objects.For more information, see the Integration Toolkit Programmer’s Guide and theIntegration Toolkit Function Reference.

1-4 PLM XML Export Import Administration Guide PLM00030 B1

Page 11: Plm Xml Import Export

Getting started with PLM XML Export Import Administration

Basic tasks using PLM XML Export Import AdministrationWith PLM XML Export Import Administration, you create transfer mode objectsthat help end users export and import Teamcenter objects and system data. Tocreate a transfer mode object, you may need to:

• Create or edit a closure rule.

• Create or edit a filter rule.

• Create or edit an action rule.

• Create or edit a property set.

Once you create these items, you can assemble them into a transfer mode object.

You can also create a transfer option set for use with Teamcenter Data Exchange.

Syntax definitionsThis manual uses a set of conventions to define the syntax of Teamcenter commands,functions, and properties. Following is a sample syntax format:

harvester_jt.pl [bookmark-file-name bookmark-file-name ...][directory-name directory-name ...]

The conventions are:

Bold Bold text represents words and symbols you must type exactly asshown.

In the preceding example, you type harvester_jt.pl exactly asshown.

Italic Italic text represents values that you supply.

In the preceding example, you supply values for bookmark-file-nameand directory-name.

text-text A hyphen separates two words that describe a single value.

In the preceding example, bookmark-file-name is a single value.

[ ] Brackets represent optional elements.

... An ellipsis indicates that you can repeat the preceding element.

Following are examples of correct syntax for the harvester_jt.pl: command:

harvester_jt.plharvester_jt.pl assembly123.bkmharvester_jt.pl assembly123.bkm assembly124.bkm assembly125.bkmharvester_jt.pl AssemblyBookmarks

PLM00030 B1 PLM XML Export Import Administration Guide 1-5

Page 12: Plm Xml Import Export
Page 13: Plm Xml Import Export

Chapter

2 Working with transfer modeobjects

Managing closure rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1Syntax for closure rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2Create closure rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7Edit closure rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9Delete closure rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9Map attributes with a closure rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9

Managing filter rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10Create filter rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10Edit filter rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11Delete filter rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11

Managing action rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12Create action rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12Edit action rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13Delete action rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13

Managing property sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-13Property set clauses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14Create property sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15Edit property sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16Delete property sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16

Managing transfer mode objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16Create transfer mode objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17Edit transfer mode objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17Delete transfer mode objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18

Export transfer mode example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18

Best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27Transfer mode best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27

Do not use the JTDataExportDefault and JTDataImportDefault transfermodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27

Use specific type identifiers for better performance . . . . . . . . . . . . . . . 2-27Unload objects in transfer mode to speed processing . . . . . . . . . . . . . . 2-28

Closure rule best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-28Export other ApplicationRef elements . . . . . . . . . . . . . . . . . . . . . . . . 2-28Ignore ApplicationRef elements on import . . . . . . . . . . . . . . . . . . . . . 2-29Export substitutes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29

PLM00030 B1 PLM XML Export Import Administration Guide

Page 14: Plm Xml Import Export

Import or update a saved option set (SOS) . . . . . . . . . . . . . . . . . . . . . 2-29Add filter list to optimize retrieval of BOM lines . . . . . . . . . . . . . . . . . 2-29Use the log file to maximize performance . . . . . . . . . . . . . . . . . . . . . . 2-29Use the bom_cb switch to avoid exporting the entire BOM . . . . . . . . . 2-30Skip ItemMaster forms on import . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31Place data in context on import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31Closure rules for PublishLink and part/design objects . . . . . . . . . . . . . 2-31

PLM XML Export Import Administration Guide PLM00030 B1

Page 15: Plm Xml Import Export

Chapter

2 Working with transfer modeobjects

Transfer mode objects are created in PLM XML Export Import Administration andare displayed as options when users import or export objects or system data usingone of the Teamcenter applications. They allow users to export and import data withlittle knowledge other than the name of the transfer mode object that they shoulduse; for example, ToCompanyA, FromCompanyB, or ToCompanyB.

Note

When importing data in to Teamcenter, object names and IDs that are too longfor the field are truncated.

Transfer mode objects are made up of the following items that configure the importor export operation.

• Closure rules

Define the scope of the data translation.

• Filter rules

Use conditions to apply a finer level of control over which data gets translatedalong with the primary objects.

• Action rules

Sets of methods that can be called before, during, and after the translation.

• Property sets

Provide a mechanism for PLM XML objects to have arbitrary properties in theform of UserData elements.

Managing closure rulesClosure rules control the scope of the data translation on both input and output.They specify how the data structure is traversed by specifying which relationshipsare of interest and what should be done when these relationships are encountered.

Closure rules are comprised of five parts: primary object selector, secondary objectselector, relation selector, action, and an optional conditional clause. Closure rulesgenerally come in sets. The closure rule clauses are evaluated in order for each targetobject. The first applicable rule determines the disposition of the related object.

PLM00030 B1 PLM XML Export Import Administration Guide 2-1

Page 16: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

A rule is applicable only if the target object fits the primary selector, the secondaryobject fits the secondary selector, the relationship between the two objects fits therelationship selector, and the conditional clause evaluates to TRUE. The actionof the applicable closure rule clause determines how the translator handles thesecondary object.

If no rule applies, the object is skipped. If the action is TRAVERSE, the objectbecomes another target of the translation. If the action is PROCESS, the secondaryobject is written (into either PLM XML or the Teamcenter database), but no closurerule clauses are applied to the secondary object’s related objects. If the action isSKIP, nothing is done with the object.

Use PLM XML Export Import Administration to create, edit, and delete closure rules.

Syntax for closure rules

The following example illustrates the syntax for closure rules:

{CLASS | TYPE}.primary-class-or-type-name:{CLASS |TYPE}.secondary-class-or-type-name:{ATTRIBUTE | PROPERTY |RELATIONS2P | RELATIONP2S | REFBY | OCCTYPE | CONTENT |FUNCTION}.name-of-connecting-relationship:{directive1+directive2+directive3}:conditional-clause

Note

Using an asterisk (*) rather than specifying a name after the primary orsecondary object keyword indicates that all classes or types fit the primaryor secondary object criteria.

Use caution when using the wildcard. For example, the following closure ruleattempts to translate every object in the database:

CLASS.*:CLASS.*:PROPERTY.*:Traverse_and_Process

Table 2-1. Closure rule syntax

Clause item Definition

Primary objectselector

Specifies the primary object class or type to be translated.The class or type name is preceded by the CLASS or TYPEkeyword and a period (.). For example:

CLASS.Item

Secondary objectselector

Specifies the secondary object class or type to be translated.The class or type name is preceded by the CLASS or TYPEkeyword and a period (.). For example:

TYPE.Item

2-2 PLM XML Export Import Administration Guide PLM00030 B1

Page 17: Plm Xml Import Export

Working with transfer mode objects

Table 2-1. Closure rule syntax

Clause item Definition

Relation selector Specifies the relationship between the secondary andprimary object class or type. The relation name is precededby a keyword and a period. For example:

ATTRIBUTE.items_tag

Using a wildcard (*) rather than specifying a name afterany of the keywords indicates that all relations of this typefit the rule.

The following keywords apply to relation selectors:

PROPERTY

Specifies the name of the Teamcenter property of theprimary object that refers to the secondary object.

ATTRIBUTE

Specifies the name of the Teamcenter attribute of theprimary object that refers to the secondary object.

RELATIONS2P

Specifies the relation type that binds the primaryand secondary object and indicates that the traversalbegins at the secondary object.

RELATIONP2S

Specifies the relation type that binds the primaryand secondary object and indicates that the traversalbegins at the primary object.

REFBY

Specifies the name of the attribute of the secondaryobject that relates the secondary object to the primaryobject.

OCCTYPE

Specifies the type of occurrence in a BOM window thatrelates the primary object to the secondary object.

CONTENT

Specifies that the relation being traversed is in a PLMXML®Teamcenter translation and the secondaryobject is understood to be an element contained in theprimary object. The name is ignored for content.

PLM00030 B1 PLM XML Export Import Administration Guide 2-3

Page 18: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

Table 2-1. Closure rule syntax

Clause item Definition

Relation selector FUNCTION

Specifies that the named function be executed. WhenFUNCTION is used as the relationship selector, youmust use the conditional clause to specify the functionarguments in the form of FUNC_ARGS. If the functionhas more than one argument, they should be separatedby semi-colons (for example, FUNC_ARGS(arg1;arg2;arg3)). An argument can be one of the followingforms:

• $option_symbol_name

The value of this option is passed to FUNCTION.

• “abc”

The value abc is passed to FUNCTION, like aliteral in a programming language.

• PRIMARY.prop_name

The value of prop_name on primaryObjectis passed to FUNCTION. SECONDARY andRELATION are not allowed as they are not yetavailable while processing FUNCTION.

For example, a closure rule clause that usesFUNCTION looks like this:

CLASS.Item:CLASS.ItemRevision:FUNCTION.process_revision_selector:TRAVERSE_AND_PROCESS:FUNC_ARGS($opt_rev_select)

This clause specifies that during traversal, whenthe transfer mode encounters an instance of Item asa primary object, it must determine the necessaryItemRevision secondary objects and executethe appropriate FUNCTION registered againstprocess_revision_selector function handle.

The only function supported isprocess_revision_selector, used to process the$opt_rev_select option. The possible values for$opt_rev_select are:

2-4 PLM XML Export Import Administration Guide PLM00030 B1

Page 19: Plm Xml Import Export

Working with transfer mode objects

Table 2-1. Closure rule syntax

Clause item Definition

• allItemRevisions

(Include All Revisions in Multi-SiteCollaboration)

• latestRevisionOnly

(Latest Revision Only in Multi-Site Collaboration)

• latestWorkingRevisionOnly

(Latest Working Revision Only in Multi-SiteCollaboration)

• latestWorkingAnyOnly

(Latest Working/Any Release Status in Multi-SiteCollaboration)

• latestReleasedRevisionOnly

(Latest Any Release Status in Multi-SiteCollaboration)

• selectedRevisionsOnly

(Selected Revision(s) Only in Multi-SiteCollaboration)

• specificStatusOnly_status-name

(Specific Release Status Only in Multi-SiteCollaboration)

For more information about revision selectors, see theMulti-Site Collaboration Guide.

Action Type Specifies the traversal actions to be taken. It must be oneor a combination of the following keywords:

SKIP

Specifies that the relationship should not be followed.This directive is useful to eliminate special casesbefore a more general rule is reached. For example,you could use the clauses in the following exampleto get all occurrence notes from a BOM line exceptmanufacturing notes:

TYPE.BOMLine:TYPE.MfgNote.PROPERTY.bl_all_notes:SKIP

TYPE.BOMLine:TYPE.*:PROPERTY.bl_all_notes:PROCESS

PLM00030 B1 PLM XML Export Import Administration Guide 2-5

Page 20: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

Table 2-1. Closure rule syntax

Clause item Definition

The bl_all_notes property points only to notes;therefore, the relaxed secondary condition of thesecond clause allows all note types to be included. Themanufacturing notes are skipped because the clausesare ordered.

Note

The SKIP action cannot be combined with anyother action.

PROCESS

Processes the secondary object but does not traversefurther, unless combined with the TRAVERSE action.

TRAVERSE

Specifies that the object becomes another target of thetranslation.

REFERENCE

Writes a PLM XML pointer entity.

CHANGE_CLOSURE_RULE

Alters the closure rules in force when an entity beingprocessed contains its own closure rule element.

Note

The PROCESS and REFERENCE actions aremutually exclusive.

Conditional Clause Evaluates to TRUE or FALSE and is expressed in thefollowing form:

term1 [==,!=] term2

Terms can be expressed in the following forms:

Quoted StringString text enclosed in quotation marks, for example,“WORKING”.

$nameAllows the rule to be in effect if a program statevariable is set, which allows the closure rule to takeadvantage of internal program states for particularlycomplex traversal operations.

2-6 PLM XML Export Import Administration Guide PLM00030 B1

Page 21: Plm Xml Import Export

Working with transfer mode objects

Table 2-1. Closure rule syntax

Clause item Definition

[PRIMARY,SECONDARY,RELATIONSHIP].property_name

TYPE.CfgAttachmentLine :TYPE.CfgAttachmentLine:PROPERTY.me_cl_child_lines:TRAVERSE_AND_PROCESS:SECONDARY.al_source_class=="Dataset

In all cases, the terms are converted to characterstrings, a string compare is performed, and the clauseis evaluated. The closure rule qualifies only if theconditional clause evaluates to TRUE.

Create closure rules

1. Choose the ClosureRule node in the TransferMode tree (located in the lower-leftpane of the PLM XML Export Import Administration window).

The system displays the ClosureRule pane.

2. Type a name for the rule in the Traversal Rule Name box.

3. Optionally, type a description of the closure rule in the Description box.

4. In Scope of Traversal, click either Export or Import.

5. In the Output Schema Format, select either PLMXML for a standard PLM XMLimport or export or TC PLMXML if you are using Data Exchange to move databetween Teamcenter and Teamcenter for enterprise knowledge managementsites.

6. Create the ordered clauses that specify how the data structure is traversed.

a. Click the Add clause button to the right of the clause table.The system displays a blank row in the table.

b. Select one of the following keywords from the Primary Object Class Type list:CLASS

TYPE

*The wildcard (*) indicates that all classes or types fit the primary objectcriteria.

c. Type the primary object’s name in the Primary Object box. If the wildcard (*)was selected in the previous step, you do not have to specify an object name.

d. Select one of the following options from the Secondary Object Class Typelist:

PLM00030 B1 PLM XML Export Import Administration Guide 2-7

Page 22: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

CLASS

TYPE

*

The wildcard (*) indicates that all classes or types fit the primary objectcriteria.

e. Type the secondary object’s name in the Secondary Object box. If thewildcard (*) was selected in the previous step, you do not have to specifyan object name.

f. Select one of the Relation Type options listed in table 2-1.

g. Type the name of a single property (or multiple properties) or objects inthe Related Property Or Object box.

h. Select one or more of the following options from the Action Type list:

SKIP

Specifies that the relationship should not be followed. This directive isuseful to eliminate special cases before a more general rule is reached.For example, you could use the clauses in the following example to get alloccurrence notes from a BOM line except manufacturing notes:

TYPE.BOMLine:TYPE.MfgNote.PROPERTY.bl_all_notes:SKIP

TYPE.BOMLine:TYPE.*:PROPERTY.bl_all_notes:PROCESS

The bl_all_notes property points only to notes; therefore, the relaxedsecondary condition of the second clause allows all note types to beincluded. The manufacturing notes are skipped because the clausesare ordered.

Note

The SKIP action cannot be combined with any other action.

PROCESS

Processes the secondary object but does not traverse further, unlesscombined with the TRAVERSE action.

TRAVERSE

Specifies that the object becomes another target of the translation.

REFERENCE

Writes a PLM XML pointer entity.

CHANGE_CLOSURE_RULE

Alters the closure rules in force when an entity being processed containsits own closure rule element.

2-8 PLM XML Export Import Administration Guide PLM00030 B1

Page 23: Plm Xml Import Export

Working with transfer mode objects

Note

The PROCESS and REFERENCE actions are mutually exclusive.

i. Optionally, type a conditional clause in the Conditional Clause box.

j. Repeat the previous steps to add additional clauses to the closure rule.

k. Optionally, change the precedence of the rule clauses by selecting a row inthe table and using the Move Up or Move Down buttons to the right ofthe clause table.

7. Click the Create button.

The system displays the new rule in the ClosureRule node of the TransferModetree. This rule can now be used when building transfer mode objects.

Edit closure rules

You can edit closure rules by adding, removing, or changing the definition of theclauses that make up the rule. You can also change the precedence of the clauses.

1. Select the node in the ClosureRule branch of the TransferMode tree thatcorresponds to the rule you want to modify.

2. Modify the contents or precedence of the clauses, as described in Create closurerules.

3. Click the Modify button.

The system saves the changes to the database.

Delete closure rules

1. Select the node in the ClosureRule branch of the TransferMode tree thatcorresponds to the rule you want to delete.

2. Click the Delete button.

The system displays the Delete Confirmation dialog box.

3. Click the Yes button to delete the rule or click the No button to cancel.

Map attributes with a closure rule

If you need to communicate an object’s attribute information between an applicationand Teamcenter during open, export, save, or import operations, you can map thoseattributes with PLM XML.

The application object is stored as an item and item revision, and the associatedapplication data file is a named reference of the dataset that is created as part of theitem revision. You can map the application attributes to any property that can bedefined in a mapping list. For example, it can be one of the properties in the itemrevision master form or the item master form.

PLM00030 B1 PLM XML Export Import Administration Guide 2-9

Page 24: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

To map attributes, you must write a closure rule with the following clause and setit in the transfer mode used for export:

• Primary Object Class Type

CLASS

• Primary Object

Dataset

• Secondary Object Class Type

CLASS

• Secondary Object

*

• Relation Type

PROPERTY

• Related Property Or Object

AppAttr

• Action Type

PROCESS

Managing filter rulesFilter rules allow a finer level of control over the data that gets translated along withthe primary objects by specifying that a user-written function is called to determinethe operation applied against a given object. Filter rules conform to the syntaxdescribed in Syntax for closure rules.

Closure rules only allow you to control what is going to happen when moving fromone object to the next. But if you base your decision on more complex criteria, youneed a filter rule. For example, you need a filter rule if you want the PLM XMLimport export to follow these steps: if the item revision has a UGMASTER dataset,translate it and skip all other datasets; if there is no UGMASTER dataset, exportthe JT dataset. Closure rules cannot base their traversal on what child element is inexistence, but filter rules can.

Use PLM XML Export Import Administration to create, edit, and delete filter rules.

Create filter rules

1. Choose the FilterRule node in the TransferMode tree (located in the lower-leftpane of the PLM XML Export Import Administration window).

The system displays the FilterRule pane.

2. Type a name for the rule in the Filter Rule Name box.

3. Optionally, type a description of the rule in the Description box.

2-10 PLM XML Export Import Administration Guide PLM00030 B1

Page 25: Plm Xml Import Export

Working with transfer mode objects

4. In Scope of Filter, click either Export or Import.

5. In the Output Schema Format, select either PLMXML for a standard PLM XMLimport or export or TC PLMXML if you are using Data Exchange to move databetween Teamcenter and Teamcenter for enterprise knowledge managementsites.

6. Create the ordered clauses that specify how the data structure will be traversed:

a. Click the Add clause button to the right of the clause table.

b. Select one of the following keywords from the Object Class Type list:CLASS

TYPE

*The wildcard (*) indicates that all classes or types fit the primary objectcriteria.

c. Type the object’s name in the Object Name box. If the wildcard (*) wasselected in the previous step, you do not need to specify an object name.

d. Select a rule in the Filter Rule Name list.

7. Click the Create button.The system displays the new rule in the FilterRule node of the TransferModetree. This rule can now be used when building transfer mode objects.

Edit filter rules

You can edit filter rules by adding, removing, or changing the definition of the clausesthat make up the rule. You can also change the precedence of the clauses.

1. Select the node in the FilterRule branch that corresponds to the rule you wantto modify.

2. Modify the contents or precedence of the clauses, as described in Create filterrules.

3. Click the Modify button.The system saves the changes to the database.

Delete filter rules

1. Select the node in the FilterRule branch that corresponds to the rule you wantto modify.

2. Click the Delete button.The system displays the Delete Confirmation dialog box.

3. Click the Yes button to delete the rule, or click the No button to cancel.

PLM00030 B1 PLM XML Export Import Administration Guide 2-11

Page 26: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

Managing action rulesAction rules are sets of methods that can be called before, during, and after thetranslation. The Teamcenter PLM XML import export framework allows for thepre-functional, during-action, and post-functional processing of action rules onbehalf of the user. For example:

• Pre-action

These rules are executed before the translation occurs. You can use these toverify or prepare the application, data, or Teamcenter for the translation.

• During-action

When the PLM XML import export is iterating through the data in yourtranslation, the translation engine verifies if you have during-action rules aftereach object translation. If so, the rules are executed. You can use these rules tochange or record the state of the translation for this specific object.

• Post-action

Post-processing is done after the translation is complete, but the session still hascontrol over the translation. With post-action rules, you can verify the specificerrors or content translations of each object.

For more information about creating and registering your own custom action rules,see the Integration Toolkit Programmer’s Guide.

Use PLM XML Export Import Administration to create, edit, and delete action rules.

Create action rules1. Choose the ClosureRule node in the TransferMode tree (located in the lower-left

pane of the PLM XML Export Import Administration window).

The system displays the ClosureRule pane.

2. Type a name for the rule in the Action Rule Name box.

3. Optionally, type a description of the action rule in the Description box.

4. In Scope of Action, click either Export or Import.

5. In the Output Schema Format, select either PLMXML for a standard PLM XMLimport or export or TC PLMXML if you are using Data Exchange to move databetween Teamcenter and Teamcenter for enterprise knowledge managementsites.

6. In the Location of Action list, select when you want the action handler toexecute: Pre Action, During Action, or Post Action. When the handler executesdepends if you are importing or exporting.

Option

Scope of action=Teamcenter(export) Scope of action = PLMXML (import)

Pre Action Before opening PLMXML file

Before XSLT file is imported

2-12 PLM XML Export Import Administration Guide PLM00030 B1

Page 27: Plm Xml Import Export

Working with transfer mode objects

Option

Scope of action=Teamcenter(export) Scope of action = PLMXML (import)

During Action After translation Before translation

Post Action After XSLT file isexported

After PLM XML file is closed

7. In the Action Handler list, select the action handler you want executed.

8. Click the Create button.

The system displays the new rule in the ActionRule node of the TransferModetree. This rule can now be used when building transfer mode objects.

Edit action rules

You can edit action rules by changing the action handler, scope of action, or locationof action.

1. Select the node in the ActionRule branch of the TransferMode tree thatcorresponds to the rule you want to modify.

2. Modify the contents or precedence of the clauses, as described in Create actionrules.

3. Click the Modify button.

The system saves the changes to the database.

Delete action rules

1. Select the node in the ActionRule branch of the TransferMode tree thatcorresponds to the rule you want to delete.

2. Click the Delete button.

The system displays the Delete Confirmation dialog box.

3. Click the Yes button to delete the rule or click the No button to cancel.

Managing property setsProperty sets provide a nonprogrammatic way to control what is placed in theUserData element. The UserData element is a container for a list of name-valuepairs that allows any attribute or property in an ImanObject object that is not inthe PLM XML equivalent to be stored.

The Teamcenter data model is richer than the PLM XML model and you can extendthe Teamcenter data model further. Property sets are a way to get Teamcenterdata into the PLM XML file that may not be in the PLM XML schema and can becontrolled by a programmer who does not know Teamcenter code or how to write it.A property set is simply a list of property set clauses.

PLM00030 B1 PLM XML Export Import Administration Guide 2-13

Page 28: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

Use PLM XML Export Import Administration to create, edit, and delete propertysets.

Property set clauses

Property set clauses have the following form:

{CLASS | TYPE}.primary-class-or-type-name:{PROPERTY | ATTRIBUTE}.name-of-connecting-relationship:{DO | SKIP}

Table 2-2. Property set syntax

Clause item Definition

Primary objectselector

Specifies the primary object class or type to be translated.The class or type name is preceded by the CLASS or TYPEkeyword and a period (.). For example:

CLASS.Item

Relation selector Specifies the relationship between the secondary andprimary object class or type. The relation name is precededby a keyword and a period. For example:

ATTRIBUTE.items_tag

Using a wildcard (*) rather than specifying a name afterany of the keywords indicates that all relations of this typefit the rule.

The following keywords apply to relation selectors:

PROPERTY

Specifies the name of the Teamcenter property of theprimary object that refers to the secondary object.

ATTRIBUTE

Specifies the name of the Teamcenter attribute of theprimary object that refers to the secondary object.

Action Type Specifies the traversal actions to be taken. It must be oneof the following keywords:

DO Specifies that the action be executed.

SKIP Specifies that the relationship should not befollowed. This directive is useful to eliminatespecial cases before a more general rule isreached.

Note

The SKIP action cannot be combinedwith any other action.

2-14 PLM XML Export Import Administration Guide PLM00030 B1

Page 29: Plm Xml Import Export

Working with transfer mode objects

If a Teamcenter object has a property set clause associated with it for the giventransfer mode, a UserData element is created in the content of the equivalentPLM XML object the Teamcenter object gets translated into. The property/attributeappears as a PLM XML UserValue element in UserData with the value title set tothe property name and the value set to the property/attribute value. If the propertyset looks like this:

CLASS.ItemRevision:PROPERTY.last_mod_date:DOCLASS.ItemRevision:PROPERTY.object_string:DO

the PLM XML file looks like this:<ProductRevision id="id12" name="assly" accessRefs="#id5" masterRef="#id20"

revision="A"><UserData id="id15">

<UserValue value="02-Dec-2003 12:37" title="last_mod_date"></UserValue><UserValue value="000338/A-assly" title="object_string"></UserValue>

</UserData></ProductRevision>

This means that without writing any code, you have access to anything theTeamcenter property service can provide you. If the PLM XML object has aUserData element, theTeamcenter PLM XML import export framework tries tofind a property of that name.

Create property sets

1. Choose the PropertySet node in the TransferMode tree in the lower-left ofthe window.

The system displays the PropertySet definition pane.

2. Type a name for the property set in the Property Set Name box.

3. Optionally, type a description of the property set in the Description box.

4. In Scope of Property Set, select either Export or Import.

5. Create the ordered clauses that specify how the data structure will be traversed:

a. Click the Add clause button located to the right of the clause table.

b. Select one of the following keywords from the Primary Object Class Type list:CLASS

TYPE

c. Type the primary object’s name in the Primary Object box.

d. Select one of the following Relation Type options:

PROPERTY Specifies the name of the Teamcenter property of theprimary object that refers to the secondary object.

ATTRIBUTE Specifies the name of the Teamcenter attribute of theprimary object that refers to the secondary object.

e. Type the name of a single property (or multiple properties) or objects inthe Related Property Or Object box.

PLM00030 B1 PLM XML Export Import Administration Guide 2-15

Page 30: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

f. Select one of the following from the Property Action Type list:

DO Specifies that the action be executed.

SKIP Specifies that the relationship should not be followed. Thisdirective is useful to eliminate special cases before a moregeneral rule is reached.

Note

The SKIP action cannot be combined with any otheraction.

g. Repeat the previous steps to add additional clauses to the property set.

h. Optionally, change the precedence of the rule clauses by selecting a row inthe table and using the Move Up or Move Down buttons to the right ofthe clause table.

6. Click the Create button.The system displays the new rule in the PropertySet node of the TransferModetree. This set can now be used when building transfer mode objects.

Edit property sets

You can edit property sets by adding, removing, or changing the definition of theclauses. You can also change the precedence of the clauses.

1. Select the node in the PropertySet branch that corresponds to the rule you wantto modify.

2. Modify the contents or precedence of the clauses, as described in Create propertysets.

3. Click the Modify button.The system saves the changes to the property set to the database.

Delete property sets

1. Select the node in the PropertySet branch that corresponds to the set you wantto delete.

2. Click the Delete button.The system displays the Delete Confirmation dialog box.

3. Click the Yes button to delete the rule, or click the No button to cancel.

Managing transfer mode objectsTransfer mode objects combine rules and property sets to define the context of thePLM XML import or export operation. These objects are presented as context optionswhen you import or export objects or system data using the Teamcenter applications.

2-16 PLM XML Export Import Administration Guide PLM00030 B1

Page 31: Plm Xml Import Export

Working with transfer mode objects

Create transfer mode objects

1. Choose the TransferMode node in the TransferMode tree (located in the lowerleft pane of the PLM XML Export Import Administration window).

The system displays the TransferMode pane.

2. Type a unique name for the transfer mode object in the Name box. This name isdisplayed in the context fields of the Teamcenter export and import dialog boxesand should clearly identify the context to the user.

3. Optionally, type the context string that maps the transfer mode object to acustomized processor for the given object type in the Context box.

4. Type a description of the transfer mode object in the Description box.

5. Select a Type of Transfer option to specify whether this transfer mode applies toexport or import.

6. In the Output Schema Format, select either PLMXML for a standard PLM XMLimport or export or TC PLMXML if you are using Data Exchange to move databetween Teamcenter and Teamcenter for enterprise knowledge managementsites.

7. Optionally, select the Support Incremental check box.

8. Select a rule from the Closure Rule list.

9. Optionally, select a rule from the Filter Rule list.

10. Optionally, select a property set from the Property Set list.

Note

The details of a rule or property set can be viewed by selecting the nodecorresponding to the rule or property set in the TransferMode tree locatedin the lower-left portion of the window. The rule clauses are displayedin the right portion of the window.

11. Optionally, select a revision rule from the Revision Rule list.

12. Select an action from the Action List.

13. Click the Create button.

The system saves the transfer mode object to the database and it is displayed inthe TransferMode tree.

Edit transfer mode objects

You can edit transfer mode objects by adding, removing, or changing the rules,property sets, configuration objects, or actions that define the object.

1. Select the node in the TransferMode tree that corresponds to the object youwant to edit.

PLM00030 B1 PLM XML Export Import Administration Guide 2-17

Page 32: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

2. Modify the definition by changing options, as described in Create transfer modeobjects.

3. Click the Modify button.

The system saves the changes to the object to the database.

Delete transfer mode objects

1. Select the node in the TransferMode tree that corresponds to the object youwant to delete.

2. Click the Delete button.

The system displays the Delete Confirmation dialog box.

3. Click the Yes button to delete the object, or click the No button to cancel.

Export transfer mode exampleThe following example incrementally builds the rules to export an assembly withits components. The assembly is an item named assy1 that consists of two otheritems (comp1 and comp2). The assembly’s item revision has a MSPowerPointdataset called sampleppt with the template.ppt file attached. If you want tofollow the steps in this example, create the assy1, comp1, and comp2 items in MyTeamcenter and the assembly in Product Structure Editor.

1. Create a closure rule with the name sampleCR and select Teamcenter forScope of Transveral. Do not add any clauses yet. For step-by-step instructions,see Create closure rules.

2. Create a transfer mode with the name sampleExport. TypeDEFAULT_PIE_CONTEXT_STRING in the Context box. Select Export forType of Transfer and select your newly created sampleCR closure rule.

3. Using My Teamcenter, export the item revision for assy1 using your newtransfer mode. The result is similar to this:

<?xml version="1.0" encoding="utf-8"?><PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema"schemaVersion="6" date="2006-10-06" time="15:58:36" author="Teamcenter- smithj@IMC-433969693(433969693)">

<Header id="id1" traverseRootRefs="#id2" transferContext="sampleExport"></Header>

<ProductRevision id="id2" name="Assy1" accessRefs="#id3"subType="ItemRevision" masterRef="#id6" revision="A">

<ApplicationRef version="B_CVid3PR2drRD" application="Teamcenter"label="BmNVid3PR2drRD"></ApplicationRef></ProductRevision>

<Product id="id6" name="Assy1" accessRefs="#id3" subType="Item"productId="000001">

<Description>a sample assembly</Description><ApplicationRef version="BmNVid3PR2drRD" application="Teamcenter"label="BmNVid3PR2drRD"></ApplicationRef>

</Product><AccessIntent id="id3" intent="reference" ownerRefs="#id4"></AccessIntent><Site id="id4" name="IMC-433969693" siteId="433969693"><UserData id="id5"><UserValue value="" title="connect_string"></UserValue>

2-18 PLM XML Export Import Administration Guide PLM00030 B1

Page 33: Plm Xml Import Export

Working with transfer mode objects

<UserValue value="1" title="dbms"></UserValue><UserValue value="" title="imc_node_name"></UserValue><UserValue value="0" title="imc_ods_site"></UserValue></UserData></Site></PLMXML>

4. Add the following clause to the closure rule to export the item revision masterform:

• Primary Object Class Type

CLASS

• Primary Object

ItemRevision

• Secondary Object Class Type

CLASS

• Secondary Object

Form

• Relation Type

RELATIONP2S

• Related Property Or Object

IMAN_master_form

• Action Type

PROCESS

5. Export the same item revision again. It looks similar to this:<?xml version="1.0" encoding="utf-8"?><PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema"schemaVersion="6" date="2006-10-06" time="15:58:36" author="Teamcenter- smithj@IMC-433969693(433969693)">

<Header id="id1" traverseRootRefs="#id2" transferContext="sampleExport"></Header>

<ProductRevision id="id2" name="Assy1" accessRefs="#id3"subType="ItemRevision" masterRef="#id6" revision="A">

<ApplicationRef version="B_CVid3PR2drRD" application="Teamcenter"label="BmNVid3PR2drRD"></ApplicationRef>

<AssociatedForm id="id9" role="IMAN_master_form" formRef="#id7"></AssociatedForm></ProductRevision><Product id="id6" name="Assy1" accessRefs="#id3" subType="Item"productId="000001">

<Description>a sample assembly</Description><ApplicationRef version="BmNVid3PR2drRD" application="Teamcenter"label="BmNVid3PR2drRD"></ApplicationRef>

</Product><AccessIntent id="id3" intent="reference" ownerRefs="#id4"></AccessIntent><Site id="id4" name="IMC-433969693" siteId="433969693"><UserData id="id5"><UserValue value="" title="connect_string"></UserValue><UserValue value="1" title="dbms"></UserValue>

PLM00030 B1 PLM XML Export Import Administration Guide 2-19

Page 34: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

<UserValue value="" title="imc_node_name"></UserValue><UserValue value="0" title="imc_ods_site"></UserValue></UserData></Site><Form id="id7" name="000001/A" accessRefs="#id3"subType="ItemRevision Master" subClass="ItemRevision Master">

<ApplicationRef version="B_GVid3PR2drRD" application="Teamcenter"label="B_GVid3PR2drRD"></ApplicationRef>

<UserData id="id8" type="FormAttributes"><UserValue value="" title="user_data_1"></UserValue><UserValue value="" title="user_data_2"></UserValue><UserValue value="" title="user_data_3"></UserValue><UserValue value="" title="previous_version_id"></UserValue><UserValue value="" title="serial_number"></UserValue><UserValue value="" title="project_id"></UserValue><UserValue value="" title="item_comment"></UserValue></UserData></Form></PLMXML>

The AssociatedForm element in the ProductRevision and the Form elementis added to the previous export.

6. Add another clause to the closure rule to export specification attachments:

• Primary Object Class Type

CLASS

• Primary Object

ItemRevision

• Secondary Object Class Type

CLASS

• Secondary Object

Dataset

• Relation Type

RELATIONP2S

• Related Property Or Object

IMAN_specification

• Action Type

PROCESS

7. Export the same item revision again. It looks similar to this:<?xml version="1.0" encoding="utf-8"?><PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema"schemaVersion="6" date="2006-10-06" time="15:58:36" author="Teamcenter- smithj@IMC-433969693(433969693)">

<Header id="id1" traverseRootRefs="#id2" transferContext="sampleExport"></Header>

<ProductRevision id="id2" name="Assy1" accessRefs="#id3"subType="ItemRevision" masterRef="#id6" revision="A">

<ApplicationRef version="B_CVid3PR2drRD" application="Teamcenter"

2-20 PLM XML Export Import Administration Guide PLM00030 B1

Page 35: Plm Xml Import Export

Working with transfer mode objects

label="BmNVid3PR2drRD"></ApplicationRef><AssociatedForm id="id9" role="IMAN_master_form" formRef="#id7"></AssociatedForm>

<AssociatedDataSet id="id11" dataSetRef="#id10" role="IMAN_specification"></AssociatedDataSet>

</ProductRevision><Product id="id6" name="Assy1" accessRefs="#id3" subType="Item"productId="000001">

<Description>a sample assembly</Description><ApplicationRef version="BmNVid3PR2drRD" application="Teamcenter"label="BmNVid3PR2drRD"></ApplicationRef>

</Product><AccessIntent id="id3" intent="reference" ownerRefs="#id4"></AccessIntent><Site id="id4" name="IMC-433969693" siteId="433969693"><UserData id="id5"><UserValue value="" title="connect_string"></UserValue><UserValue value="1" title="dbms"></UserValue><UserValue value="" title="imc_node_name"></UserValue><UserValue value="0" title="imc_ods_site"></UserValue></UserData></Site><Form id="id7" name="000001/A" accessRefs="#id3"subType="ItemRevision Master" subClass="ItemRevision Master">

<ApplicationRef version="B_GVid3PR2drRD" application="Teamcenter"label="B_GVid3PR2drRD"></ApplicationRef>

<UserData id="id8" type="FormAttributes"><UserValue value="" title="user_data_1"></UserValue><UserValue value="" title="user_data_2"></UserValue><UserValue value="" title="user_data_3"></UserValue><UserValue value="" title="previous_version_id"></UserValue><UserValue value="" title="serial_number"></UserValue><UserValue value="" title="project_id"></UserValue><UserValue value="" title="item_comment"></UserValue></UserData></Form><DataSet id="id10" name="sampleppt" accessRefs="#id3" version="1"type="MSPowerPoint">

<ApplicationRef version="RSGVid3PR2drRD" application="Teamcenter"label="RSGVid3PR2drRD"></ApplicationRef>

</DataSet></PLMXML>

The AssociatedDataset element in the ProductRevision and the Datasetelement is added to the previous export.

8. Add more clauses to the closure rule to export the associated files:

Third clause

• Primary Object Class Type

TYPE

• Primary Object

MSPowerPoint

• Secondary Object Class Type

CLASS

• Secondary Object

ImanFile

PLM00030 B1 PLM XML Export Import Administration Guide 2-21

Page 36: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

• Relation Type

PROPERTY

• Related Property Or Object

ref_list

• Action Type

PROCESS+TRAVERSE

Fourth clause

• Primary Object Class Type

TYPE

• Primary Object

MSExcel

• Secondary Object Class Type

CLASS

• Secondary Object

ImanFile

• Relation Type

PROPERTY

• Related Property Or Object

ref_list

• Action Type

PROCESS+TRAVERSE

Fifth clause

• Primary Object Class Type

CLASS

• Primary Object

ImanFile

• Secondary Object Class Type

CLASS

• Secondary Object

*

• Relation Type

ATTRIBUTE

2-22 PLM XML Export Import Administration Guide PLM00030 B1

Page 37: Plm Xml Import Export

Working with transfer mode objects

• Related Property Or Object

original_file_name

• Action Type

PROCESS

In addition, change the Action Type for the second clause (the one exporting thedataset) to PROCESS+TRAVERSE.

9. Export the same item revision again. It looks similar to this:

<?xml version="1.0" encoding="utf-8"?><PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema"schemaVersion="6" date="2006-10-06" time="15:58:36" author="Teamcenter- smithj@IMC-433969693(433969693)">

<Header id="id1" traverseRootRefs="#id2" transferContext="sampleExport"></Header>

<ProductRevision id="id2" name="Assy1" accessRefs="#id3"subType="ItemRevision" masterRef="#id6" revision="A">

<ApplicationRef version="B_CVid3PR2drRD" application="Teamcenter"label="BmNVid3PR2drRD"></ApplicationRef>

<AssociatedForm id="id9" role="IMAN_master_form" formRef="#id7"></AssociatedForm><AssociatedDataSet id="id11" dataSetRef="#id10" role="IMAN_specification"></AssociatedDataSet></ProductRevision><Product id="id6" name="Assy1" accessRefs="#id3" subType="Item"productId="000001">

<Description>a sample assembly</Description><ApplicationRef version="BmNVid3PR2drRD" application="Teamcenter"label="BmNVid3PR2drRD"></ApplicationRef>

</Product><AccessIntent id="id3" intent="reference" ownerRefs="#id4"></AccessIntent><Site id="id4" name="IMC-433969693" siteId="433969693"><UserData id="id5"><UserValue value="" title="connect_string"></UserValue><UserValue value="1" title="dbms"></UserValue><UserValue value="" title="imc_node_name"></UserValue><UserValue value="0" title="imc_ods_site"></UserValue></UserData></Site><Form id="id7" name="000001/A" accessRefs="#id3"subType="ItemRevision Master" subClass="ItemRevision Master">

<ApplicationRef version="B_GVid3PR2drRD" application="Teamcenter"label="B_GVid3PR2drRD"></ApplicationRef>

<UserData id="id8" type="FormAttributes"><UserValue value="" title="user_data_1"></UserValue><UserValue value="" title="user_data_2"></UserValue><UserValue value="" title="user_data_3"></UserValue><UserValue value="" title="previous_version_id"></UserValue><UserValue value="" title="serial_number"></UserValue><UserValue value="" title="project_id"></UserValue><UserValue value="" title="item_comment"></UserValue></UserData></Form><DataSet id="id10" name="sampleppt" accessRefs="#id3" version="1"type="MSPowerPoint">

<ApplicationRef version="RSGVid3PR2drRD" application="Teamcenter"label="RSGVid3PR2drRD"></ApplicationRef>

</DataSet><ExternalFile id="id12" accessRefs="#id3"locationRef="000001_A-Assy1\template.ppt" format="ppt">

<ApplicationRef version="BfKVid3PR2drRD" application="Teamcenter"

PLM00030 B1 PLM XML Export Import Administration Guide 2-23

Page 38: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

label="BfKVid3PR2drRD"></ApplicationRef></ExternalFile></PLMXML>

The ExternalFile element is for MSPowerPoint only.

10. Add more clauses to the closure rule to export the structure from ProductStructure Editor:

Sixth clause

• Primary Object Class Type

TYPE

• Primary Object

BOMLine

• Secondary Object Class Type

TYPE

• Secondary Object

BOMLine

• Relation Type

PROPERTY

• Related Property Or Object

bl_child_lines

• Action Type

PROCESS+TRAVERSE

Seventh clause

• Primary Object Class Type

TYPE

• Primary Object

BOMLine

• Secondary Object Class Type

CLASS

• Secondary Object

ItemRevision

• Relation Type

PROPERTY

• Related Property Or Object

2-24 PLM XML Export Import Administration Guide PLM00030 B1

Page 39: Plm Xml Import Export

Working with transfer mode objects

bl_revision

• Action Type

PROCESS+TRAVERSE

11. Export the assembly related to the same item revision from Product StructureEditor. It looks similar to this:

<?xml version="1.0" encoding="utf-8"?><PLMXML xmlns="http://www.plmxml.org/Schemas/PLMXMLSchema"schemaVersion="6" date="2006-10-06" time="15:58:36" author="Teamcenter- smithj@IMC-433969693(433969693)">

<Header id="id1" traverseRootRefs="#id6" transferContext="sampleExport"></Header><ProductRevision id="id11" name="comp1" accessRefs="#id12"subType="ItemRevision" masterRef="#id15" revision="A">

<ApplicationRef version="RKDVid3PR2drRD" application="Teamcenter"label="RGKVid3PR2drRD"></ApplicationRef>

<AssociatedForm id="id18" role="IMAN_master_form" formRef="#id16"></AssociatedForm><AssociatedDataSet id="id20" dataSetRef="#id19" role="IMAN_specification"></AssociatedDataSet></ProductRevision><ProductRevision id="id24" name="comp2" accessRefs="#id12"subType="ItemRevision" masterRef="#id25" revision="A">

<ApplicationRef version="ROKVid3PR2drRD" application="Teamcenter"label="ROBVid3PR2drRD"></ApplicationRef>

<AssociatedForm id="id28" role="IMAN_master_form" formRef="#id26"></AssociatedForm></ProductRevision><ProductRevision id="id29" name="Assy1" accessRefs="#id12"subType="ItemRevision" masterRef="#id30" revision="A">

<ApplicationRef version="B_CVid3PR2drRD" application="Teamcenter"label="BmNVid3PR2drRD"></ApplicationRef>

<AssociatedForm id="id33" role="IMAN_master_form" formRef="#id31"></AssociatedForm><AssociatedDataSet id="id35" dataSetRef="#id34" role="IMAN_specification"></AssociatedDataSet></ProductRevision><Product id="id15" name="comp1" accessRefs="#id12" subType="Item"productId="000002">

<ApplicationRef version="RGKVid3PR2drRD" application="Teamcenter"label="RGKVid3PR2drRD"></ApplicationRef></Product>

<Product id="id25" name="comp2" accessRefs="#id12" subType="Item"productId="000003">

<ApplicationRef version="ROBVid3PR2drRD" application="Teamcenter"label="ROBVid3PR2drRD"></ApplicationRef></Product>

<Product id="id30" name="Assy1" accessRefs="#id12" subType="Item"productId="000001">

<Description>a sample assembly</Description><ApplicationRef version="BmNVid3PR2drRD" application="Teamcenter"label="BmNVid3PR2drRD"></ApplicationRef></Product>

<RevisionRule id="id2" name="Latest Working"><Description>Latest Working else Latest Any Status</Description><ApplicationRef version="o3IVRSyxR2drRD" application="Teamcenter"label="o3IVRSyxR2drRD"></ApplicationRef></RevisionRule>

<ProductView id="id4" ruleRefs="#id2" rootRefs="id6"primaryOccurrenceRef="id6">

<ApplicationRef application="Teamcenter"label="hWKVid3PR2drRD/o3IVRSyxR2drRD/AAAAAAAAAAAAAA/BOM">

</ApplicationRef><UserData id="id3" type="TC Specific Properties"><UserValue value="imprecise" title="BOM_precision_type"></UserValue></UserData><Occurrence id="id6" instancedRef="#id29" occurrenceRefs="id9 id22"><ApplicationRef application="Teamcenter" label="hWKVid3PR2drRD/"></ApplicationRef><UserData id="id7" type="AttributesInContext">

PLM00030 B1 PLM XML Export Import Administration Guide 2-25

Page 40: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

<UserValue value="" title="AO_ID"></UserValue><UserValue value="" title="SequenceNumber"></UserValue><UserValue value="" title="OccurrenceName"></UserValue><UserValue value="" title="Quantity"></UserValue></UserData><Transform id="id5">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</Transform></Occurrence><Occurrence id="id9" instancedRef="#id11" parentRef="#id6"><ApplicationRef application="Teamcenter"label="hWKVid3PR2drRD/heMVid3PR2drRD/"></ApplicationRef>

<UserData id="id10" type="AttributesInContext"><UserValue value="" title="AO_ID"></UserValue><UserValue value="10" title="SequenceNumber"></UserValue><UserValue value="" title="OccurrenceName"></UserValue><UserValue value="" title="Quantity"></UserValue></UserData><Transform id="id8">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</Transform></Occurrence><Occurrence id="id22" instancedRef="#id24" parentRef="#id6"><ApplicationRef application="Teamcenter"label="hWKVid3PR2drRD/hiEVid3PR2drRD/"></ApplicationRef>

<UserData id="id23" type="AttributesInContext"><UserValue value="" title="AO_ID"></UserValue><UserValue value="20" title="SequenceNumber"></UserValue><UserValue value="" title="OccurrenceName"></UserValue><UserValue value="" title="Quantity"></UserValue></UserData><Transform id="id21">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</Transform></Occurrence></ProductView><AccessIntent id="id12" intent="reference" ownerRefs="#id13"></AccessIntent><Site id="id13" name="IMC-433969693" siteId="433969693"><UserData id="id14"><UserValue value="" title="connect_string"><</UserValue><UserValue value="1" title="dbms"><</UserValue><UserValue value="" title="imc_node_name"></UserValue><UserValue value="0" title="imc_ods_site"></UserValue></UserData></Site><Form id="id16" name="000002/A" accessRefs="#id12"subType="ItemRevision Master" subClass="ItemRevision Master">

<ApplicationRef version="RKGVid3PR2drRD" application="Teamcenter"label="RKGVid3PR2drRD"></ApplicationRef>

<UserData id="id17" type="FormAttributes"><UserValue value="" title="user_data_1"></UserValue><UserValue value="" title="user_data_2"></UserValue><UserValue value="" title="user_data_3"></UserValue><UserValue value="" title="previous_version_id"></UserValue><UserValue value="" title="serial_number"></UserValue><UserValue value="" title="project_id"></UserValue><UserValue value="" title="item_comment"></UserValue></UserData></Form><DataSet id="id19" name="sampleexcel" accessRefs="#id12" version="1"type="MSExcel">

<ApplicationRef version="RaGVid3PR2drRD" application="Teamcenter"label="RaGVid3PR2drRD"></ApplicationRef></DataSet>

<Form id="id26" name="000003/A" accessRefs="#id12"subType="ItemRevision Master" subClass="ItemRevision Master">

<ApplicationRef version="RONVid3PR2drRD" application="Teamcenter"label="RONVid3PR2drRD"></ApplicationRef>

<UserData id="id27" type="FormAttributes"><UserValue value="" title="user_data_1"></UserValue><UserValue value="" title="user_data_2"></UserValue><UserValue value="" title="user_data_3"></UserValue><UserValue value="" title="previous_version_id"></UserValue><UserValue value="" title="serial_number"></UserValue><UserValue value="" title="project_id"></UserValue><UserValue value="" title="item_comment"></UserValue></UserData></Form><Form id="id31" name="000001/A" accessRefs="#id12"subType="ItemRevision Master" subClass="ItemRevision Master">

<ApplicationRef version="B_GVid3PR2drRD" application="Teamcenter"label="B_GVid3PR2drRD"></ApplicationRef>

<UserData id="id32" type="FormAttributes">

2-26 PLM XML Export Import Administration Guide PLM00030 B1

Page 41: Plm Xml Import Export

Working with transfer mode objects

<UserValue value="" title="user_data_1"></UserValue><UserValue value="" title="user_data_2"></UserValue><UserValue value="" title="user_data_3"></UserValue><UserValue value="" title="previous_version_id"></UserValue><UserValue value="" title="serial_number"></UserValue><UserValue value="" title="project_id"></UserValue><UserValue value="" title="item_comment"></UserValue></UserData></Form><DataSet id="id34" name="sampleppt" accessRefs="#id12" version="2"memberRefs="#id36" type="MSPowerPoint">

<ApplicationRef version="BbMVid3PR2drRD" application="Teamcenter"label="BbMVid3PR2drRD">

</ApplicationRef></DataSet><ExternalFile id="id36" accessRefs="#id12"locationRef="000001_A-Assy1\template.ppt" format="ppt">

<ApplicationRef version="BfKVid3PR2drRD" application="Teamcenter"label="BfKVid3PR2drRD">

</ApplicationRef></ExternalFile></PLMXML>

The structure information is exported in the file. Also the related item revisionsand their attachments are exported.

Tip

If you are not sure about the details of the data model and need to find theright reference, look at the object properties in My Teamcenter or ProductStructure Editor to find the property for the related object.

Best practicesBecause PLM XML is complex, there are several best practices you can use tostreamline your transfer mode objects and closure rules.

Transfer mode best practices

Transfer modes focus on specific data traversals. You can modify transfer modes totune them for better performance.

Do not use the JTDataExportDefault and JTDataImportDefault transfer modes

Do not use the JTDataExportDefault and JTDataImportDefault transfer modes todirectly export or import JT files with the command line or the PLM XML option inthe user interface. These transfer modes require additional processing found in theJTExport and JTImport options in Product Structure Editor. For more informationabout displaying these options, see the Application Administration Guide.

Use specific type identifiers for better performance

The following example describes a typical optimization of the closurerules in a transfer mode. This example is not complete and does notconstitute a specific modification. The following closure rules are used in theConfiguredDataExportDefault transfer mode:

TYPE.BOMLine : TYPE.* :PROPERTY.bl_attachments:TravAndProc:SECONDARY.al_source_class==Dataset

TYPE.BOMLine : TYPE.* :PROPERTY.bl_attachments:TravAndProc:SECONDARY.al_source_class==Form

TYPE.BOMLine : TYPE.* :PROPERTY.bl_attachments:TravAndProc:

PLM00030 B1 PLM XML Export Import Administration Guide 2-27

Page 42: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

SECONDARY.al_source_class==Folder

These closure rules:

• Traverse and process any SECONDARY type from BOMLine to any type viathe bl_attachments property.

• Execute the al_source_class function on the SECONDARY type.

• Support its export if the function returns a dataset, form, or folder.

To optimize the closure rules, change the types to take advantage of specific typeidentifiers. The engine looks only at these types and not all types.

TYPE.BOMLine : TYPE.Dataset:PROPERTY.bl_attachments:TravAndProcTYPE.BOMLine : TYPE.Form :PROPERTY.bl_attachments:TravAndProcTYPE.BOMLine : TYPE.Folder :PROPERTY.bl_attachments:TravAndProc

Unload objects in transfer mode to speed processing

You can use the PIE_transfer-mode-name_unload_objects andPIE_transfer-mode-name_process_in_chunks user preferences to unload objectsyou no longer need in memory. The PIE_transfer-mode-name_unload_objectspreference tells Teamcenter which objects to unload from memory and in what order.

Caution

If you unload objects, such as BOM lines, required by other rich clientfunctions or features, you may cause errors. Also ensure all objects are savedto the database before unloading.

For more information about the PIE_transfer-mode-name_unload_objectspreference, see the Preferences and Environment Variables Reference.

If you set the PIE_transfer-mode-name_unload_objects preference, you canalso use the PIE_transfer-mode-name_process_in_chunks preference tospecify the objects that are to be unloaded in chunks or batches. The defaultis that all objects are unloaded in chunks. For more information about thePIE_transfer-mode-name_process_in_chunks preference, see the Preferences andEnvironment Variables Reference.

Closure rule best practices

There are several ways you can use closure rules to limit or expand what you importor export.

Export other ApplicationRef elements

The ApplicationRef element is a PLM XML construct that allows an application toidentify an object by an application-specific identifier. Teamcenter always exports anApplicationRef element for each Teamcenter object it exports. But the TeamcenterPLM XML translator can store the ApplicationRef elements of data coming fromother applications. By default, these ApplicationRef elements are not written intothe export file, but if you want to export them, use this clause:

CLASS.*:CLASS.PLMAppUID:PROPERTY.application_uid:PROCESS+TRAVERSE:

2-28 PLM XML Export Import Administration Guide PLM00030 B1

Page 43: Plm Xml Import Export

Working with transfer mode objects

The PLMAppUID object does not actually have an application_uid property, butit allows control of this type of translation.

Ignore ApplicationRef elements on import

Use the following clause to ignore ApplicationRef elements on import:TYPE.PIESession:CLASS.ApplicationRef:CONTENT.*:SKIP

Export substitutes

If you export a structure in which substitute components are defined, the substitutesare also exported if you add the following closure rule to your transfer mode:

TYPE.BOMLine:TYPE.BOMLine:PROPERTY.bl_alternate:TRAVERSE+PROCESS

Import or update a saved option set (SOS)

If you want to import or update an SOS, specify these closure rules in your transfermode:

CLASS.Document:CLASS.VariantRule:CONTENT.*:DO:CLASS.VariantRule:CLASS.*:CONTENT.*:DO:CLASS.Document:CLASS.Option:CONTENT.*:DO:CLASS.ProductRevision:CLASS.Option:ATTRIBUTE.optionRefs:DO:CLASS.Option:CLASS.*:CONTENT.*:DO:

Add filter list to optimize retrieval of BOM lines

You can limit the type of attachments to look for in a BOM line by creating a filterlist using a closure rule. This increases the performance of PLM XML imports andexports. The form of the closure rule is as follows:

CLASS:PIESession:CLASS:CfgAttachmentWindow:PROPERTY:*:PROCESSCLASS:PIESession:CLASS:CfgAttachmentWindow:PROPERTY:first—attachment—type:

PROCESSCLASS:PIESession:CLASS:CfgAttachmentWindow:PROPERTY:second—attachment—type:

PROCESS

To define a filter list, the closure rule clauses must specify PIESession as theprimary class and CfgAttachmentWindow as the secondary class. The first clauseof the closure rule must specify * as the property so Teamcenter clears any previousfilter list. Then add clauses with the attachment types you want to filter on. Youcan filter on one or more types. For example, if you want to see BOM lines with onlyrenderings or specifications attached, write the following closure rule and add itto a transfer mode:

CLASS:PIESession:CLASS:CfgAttachmentWindow:PROPERTY:*:PROCESSCLASS:PIESession:CLASS:CfgAttachmentWindow:PROPERTY:tc_rendering:PROCESSCLASS:PIESession:CLASS:CfgAttachmentWindow:PROPERTY: tc_specification:PROCESS

Use the log file to maximize performance

You can set PLM XML logging to different levels, depending on the information youwant to capture. To minimize logging, which improves speed on large translations,set the PLMXML_log_file_content preference to basic. To get closure ruleanalysis, which can help you tune your closure rules for better performance, set thePLMXML_log_file_content preference to detailed. Figure 2-1 shows an exampleclosure rule analysis.

PLM00030 B1 PLM XML Export Import Administration Guide 2-29

Page 44: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

///// BEGIN – CLOSURE RULE CLAUSE ANALYSIS REPORT

Transfermode name: incremental_importClosure rule name is: readOccurrenceIncremental_Import

Clause-1: CLASS: Document: CLASS: Form: ?: *: SKIP:Clause-2: CLASS: *: CLASS: ProductView: ?: *: PROCESS:Clause-3: CLASS: ProductDef: CLASS: InstanceGraph: ?: *: SKIP:Clause-4: CLASS: *: CLASS: *: ?: *: DO:Clause-5: CLASS: *: CLASS: *: PROPERTY: *: DO:

////// BEGIN – Specific Closure Rule Clause Evaluation

Possible Culprit: PROPERTY * Found in the following clauses of the closureruleFound in 5 clause

Possible Culprit: Primary CLASS * Found in the following clauses of theclosure ruleFound in 2 clauseFound in 4 clauseFound in 5 clause

Possible Culprit: Primary TYPE * Found in the following clauses of theclosure rule(none)

Possible Culprit: Secondary CLASS * Found in the following clauses of theclosure ruleFound in 4 clauseFound in 5 clause

///// END - Specific Closure Rule Clause Evaluation///// END – CLOSURE RULE CLAUSE ANALYSIS REPORT

Figure 2-1. Closure rule analysis

The default setting for PLMXML_log_file_content is summary, which providesmore information than basic, but less than detailed. For more information aboutthe PLMXML_log_file_content preference, see the Preferences and EnvironmentVariables Reference.

Use the bom_cb switch to avoid exporting the entire BOM

The Teamcenter PLM XML translator usually translates only what the closure ruletells it to in the order it gets to it, as it does the traversal. But there are timeswhen the act of translating one element type forces the translator to do another.For example, you cannot have a ProductRevision PLM XML entity without aProduct entity. Therefore, if you export an ItemRevision entity from Teamcenter,you also get the related Teamcenter Item entity. When you select a BOM line (orany configuration line) for export, the objects of interest are the selected line andall child lines. But the context of the selected line is lost without the top line andall the lines from the top line down to the selected line. So the translator movesback up the structure and exports all the BOM lines above the selected line but itwill not traverse the child lines of the lines above selected lines. Depending onyour closure rules, you may find that you inadvertently get the child lines of thelines above, with the effect of always translating the full BOM. If you want to avoidthis, use the following clause:

TYPE.BOMLine:TYPE.*:PROPERTY.bl_all_child_lines:TRAVERSE+PROCESS:$bom_cb != “1”;

2-30 PLM XML Export Import Administration Guide PLM00030 B1

Page 45: Plm Xml Import Export

Working with transfer mode objects

Skip ItemMaster forms on import

In PLM XML format, products may have several forms, even several ItemMasterforms. This is not the case in Teamcenter. If your import closure rule goes to anItemMaster form or an ItemRevisionMaster form from someplace other than theProduct PLM XML entity and ProductRevision entity, the form is created butnot correctly connected to the item or item revision. To avoid this, use the followingclause:

CLASS.Document:CLASS.Form:CONTENT.*:SKIP

Place data in context on import

PLM XML supports edits in an occurrence context. Occurrences in a configurationview are always absolute, but you can indicate that the data in the file is intendedto be altered in context or altered in a global scope. If the UserData tag underthe occurrence contains the following:

<UserValue value="TopLevel" title="AttributesContext"></UserValue>

the attributes, notes, and variant conditions under the occurrence are stored asan edit/create in the context of the top line. If this field is not found and the linein question has a context set for this data, the data is altered in that context. Ifthere is no data, the data is altered globally. To support attachments in context, youcan place a UserData tag in the ProductView, PlantView, ProcessView tag’scontent. For example:

<ProductView id="id2" ruleRefs="#id1" rootRefs="id44" primaryOccurrenceRef="id4"><UserData id="id136" type="AttributesInContext"><UserValue value="TopLevel" title="AttributesContext"></UserValue></UserData>

This causes the translator to interpret all new additions to be in the context of thetop line.

Closure rules for PublishLink and part/design objects

You can use PublishLink to connect absolute occurrences of source and targetstructures, such as connecting logically equivalent occurrences of design (source) andpart (target) structures. However, you must add the following closure rules for PLMXML exporting and importing of PublishLink to work properly:

• In an export transfer mode:

CLASS PublishLink TYPE * Property * TRAVERSE_PROCESSCLASS PublishLink CLASS * Property * TRAVERSE_PROCESS

• In an import transfer mode:

CLASS Document CLASS DefinitionRelation CONTENT * DOCLASS DefinitionRelation CLASS * CONTENT * DOCLASS DefinitionRelation CLASS * ATTRIBUTE * DO

After you add these closure rules, when a source structure is exported, thePublishLink objects and the target structures are also exported.

PLM00030 B1 PLM XML Export Import Administration Guide 2-31

Page 46: Plm Xml Import Export

Chapter 2 Working with transfer mode objects

Note

You can also use PublishLink to publish visualization related data from thesource to the target occurrence. To export visualization related information,you need to include rules that export that information. For example, when ashape is published from an occurrence of a component, its JT file is added tothe target occurrence with the IMANRendering relation. If you want thisinformation in the PLM XML file, you must add the appropriate closure rulesfor exporting this relation.

To export and import part/design objects, add the following closure rules:

• In an export transfer mode

TYPE Part Revision TYPE Design Revision RELATIONP2STC_Is_Represented_By TRAVERSE_AND_PROCESS

• In an import transfer mode

CLASS Document CLASS RepresentedByRelation CONTENT * DOCLASS RepresentedByRelation CLASS * CONTENT * DOCLASS RepresentedByRelation CLASS *

2-32 PLM XML Export Import Administration Guide PLM00030 B1

Page 47: Plm Xml Import Export

Chapter

3 Working with transfer option sets

Create transfer option sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2

Edit transfer option sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

Delete transfer option sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3

PLM00030 B1 PLM XML Export Import Administration Guide

Page 48: Plm Xml Import Export
Page 49: Plm Xml Import Export

Chapter

3 Working with transfer option sets

Transfer option sets are created in PLM XML Export Import Administration andare used with Teamcenter Data Exchange to move data between Teamcenter andTeamcenter for enterprise knowledge management (Teamcenter Enterprise) sites.

Transfer option sets are made up of the following items that configure the import orexport operation.

Table 3-1. Transfer option set items

Item DescriptionName Specifies the name of the transfer option set.

Description Describes the transfer option set.

Remote siteinformation

Shows whether the transfer option set is for a remote site,thus an import. If so, its remote site ID is included. Thetransfer mode is defined at the remote site.

Transfer mode Contains the set of rules that configure export operations ifa remote site is not selected.

• Closure rules

The scope of the data translation.

• Filter rules

Use conditions that apply a finer level of control overwhich data gets translated along with the primaryobjects.

• Action rules

Sets of methods that can be called before, during, andafter the translation.

• Property sets

A mechanism for PLM XML objects to have arbitraryproperties in the form of UserData elements.

Options Displays all unique options in the closure rule conditionalclauses for the selected transfer mode.

The Teamcenter administrator can set application extension points and rules alongwith a business context to restrict the use and administration of transfer option sets

PLM00030 B1 PLM XML Export Import Administration Guide 3-1

Page 50: Plm Xml Import Export

Chapter 3 Working with transfer option sets

to certain roles or groups. The inputs for the application extension point are SiteID(string), IsPush (logical), and IsExport (logical). The output is OptionSet_Name(string). The Teamcenter administrator then defines application extension rulesto display which option sets are available for a given site ID for an import orexport. The business context determines which roles or groups are associated with aparticular rule. For more information about application extension points, rules, andbusiness contexts, see the Business Modeler IDE Guide.

Create transfer option sets1. Choose the TransferOptionSet node (located in the lower left pane of the PLM

XML Export Import Administration window).

The system displays the TransferOptionSet pane.

2. Type a unique name for the transfer option set in the Name box. This nameshould clearly identify the context to the user. For remote site sets, append thesite name to the end of the name to maintain uniqueness.

3. Type a description of the transfer option set in the Description box.

4. If this transfer option set is for a remote site (in other words, an import), selectthe Is the option set for a Remote Site? check box.

Note

A remote transfer option set is normally imported from a remote site toensure that it matches the transfer option set at your site. Although youcan create a remote site transfer option set on your site and manuallysynchronize it to the remote site, Siemens PLM Software recommendsthat you use the import and export utilities (in Teamcenter, they aretcplmxml_import and tcplmxml_export, respectively) to ensure yourremote transfer option set is the same at both sites. Once a transfer optionset is imported, you must not change the transfer option set name or sitereference. However, you can add or remove options as long as the transferoption set at the remote site is updated to reflect the changes you make.

5. If you selected the Is the option set for a Remote Site? check box, select theremote site from the Remote Site ID list. If the check box is cleared, select thetransfer mode you want to use for the export in the TransferMode list. Thetransfer mode you select must have TC PLMXML as its output schema format.

6. If you select a transfer mode, the Option list is filled with all unique options inthe closure rule conditional clauses associated with the transfer mode. Thecolumns in the list are:

• OptionSpecifies the name of the option in the closure rule conditional clauses.

• Display NameSpecifies the display name given by the user.

• Default Value

3-2 PLM XML Export Import Administration Guide PLM00030 B1

Page 51: Plm Xml Import Export

Working with transfer option sets

Displays the value of the option. It is either True, False, or $opt_rev_select,which contains a list of possible revision selector values.

• Description

Displays the brief description given by the Teamcenter administrator.

• Group Name

Displays the group name given by the Teamcenter administrator to help sortthe options in appropriate categories.

• Read Only

Shows if the user can change the option values. If it is cleared, the user isallowed to change values. This is set by the Teamcenter administrator.

If the set is for a remote site, the Option list is blank, but you can add optionsfor the set. If you add options, export the set to the remote site when you arefinished.

Optionally, the Teamcenter administrator can delete an option by selecting itand clicking the button to right of the Option list or add an option by clickingthe button.

Optionally, the Teamcenter administrator can change the precedence of theoptions by selecting a row in the table and using the or buttons to theright of the Option list.

7. Click the Create button.

The system saves the transfer option set to the database and it is displayed inthe TransferOptionSet node.

Edit transfer option setsYou can edit transfer option sets by adding, removing, or changing the options ortransfer mode that define the set.

1. Select the node in the TransferOptionSet branch that corresponds to the setyou want to edit.

2. Modify the definition by changing options, as described in Create transferoption sets, or by changing the transfer mode. You cannot modify the name inthe Option box if that option came from a closure rule. You can only modifyuser-defined option names.

3. Click the Modify button.

The system saves the changes to the database.

Delete transfer option sets1. Select the node in the TransferOptionSet branch that you want to delete.

PLM00030 B1 PLM XML Export Import Administration Guide 3-3

Page 52: Plm Xml Import Export

Chapter 3 Working with transfer option sets

2. Click the Delete button.

The system displays the Delete Confirmation dialog box.

3. Click the Yes button to delete the set, or click the No button to cancel.

3-4 PLM XML Export Import Administration Guide PLM00030 B1

Page 53: Plm Xml Import Export

Appendix

A Glossary

PLM00030 B1 PLM XML Export Import Administration Guide

Page 54: Plm Xml Import Export
Page 55: Plm Xml Import Export

Appendix

A Glossary

C

Closure RuleRule that controls the scope of the translation of data imported to and exported fromTeamcenter. Closure rules specify how the data structure is traversed by specifyingthe relationships of interest and the actions to occur when these relationships areencountered.

F

Filter RulesRules that allow a fine level of control over which data is translated, in PLM XMLformat, along with the primary objects by specifying that a user-written function becalled to determine the operation applied against a specified object.

P

PLM XMLSiemens PLM Software format for facilitating product life cycle interoperabilityusing XML. PLM XML is open and based on standard W3C XML schemas.Representing a variety of product data both explicitly and via references, PLMXML provides a lightweight, extensible, and flexible mechanism for transportinghigh-content product data over the Internet.

Property Set RulesNonprogrammatic way to control what is placed in the user data element. See alsoUser Data Element.

T

Transfer ModeObjects composed of rules that configure PLM XML import and export operations.Transfer mode allows users to import and export data with little knowledge otherthan the name of the transfer mode object.

U

User Data ElementContainer for a list of name-value pairs that allows any attribute or property in aTeamcenter object that is not in the PLM XML equivalent to be stored.

PLM00030 B1 PLM XML Export Import Administration Guide A-1

Page 56: Plm Xml Import Export
Page 57: Plm Xml Import Export

Appendix

B PLM XML/Teamcenter entitymapping

PLM00030 B1 PLM XML Export Import Administration Guide

Page 58: Plm Xml Import Export
Page 59: Plm Xml Import Export

Appendix

B PLM XML/Teamcenter entitymapping

Table B-1 lists the mapping between PLM XML entities and Teamcenter entities.You can use this information to read and understand PLM XML files.

Table B-1. PLM XML/Teamcenter entity mapping

Design objectsTeamcenter objects PLM XML element

Appearance Occurrence

AppearanceGroup OccurrenceGroup

AppearanceRoot ProductView

AppGroupBOPLine Occurrence

BOMLine Occurrence

BOMView Revision ProductRevisionView

BOMWindow InstanceGraph

BOPLine Occurrence

CCObject CollaborationContext

CfgActivityLine AssociatedAttachment

CfgAttachmentLine AssociatedAttachment

ConfigurationContext ConfigurationRuleDataset DataSet

EngChange Change

EPMJob WorkflowProcess

EPMTask Task

Folder FolderForm Form

Group Organisation

GroupMember OrganisationMember

ImanFile ExternalRefItem Product

ItemRevision ProductRevision

PLM00030 B1 PLM XML Export Import Administration Guide B-1

Page 60: Plm Xml Import Export

Appendix B PLM XML/Teamcenter entity mapping

Table B-1. PLM XML/Teamcenter entity mapping

Design objectsTeamcenter objects PLM XML element

MEActivity Activity

MEAppearanceGroupLine ConfiguredOccurrenceGroup

MEAppearanceLine Occurrence

MEAppearancePathNode InstancePath

MEAppearancePathRoot ProductRoot

MEOP Operation

MEOPRevision OperationRevisionMEProcess Process

MEProcessRevision ProcessRevision

MEViewLine Occurrence

MEWorkarea WorkArea

MEWorkareaRevision WorkAreaRevisionPerson Person

POM_imc Site

PSBOMView ProductRevisionView

PSOccurrence ProductInstance

PSOccurrenceThread ProductInstance

ReleaseStatus ReleaseStatus

RevisionRule RevisionRule

Role Role

Signoff Signoff

StructureContext StructureContext

TraceLink TraceabilityRelationUser User

VariantRevision Option

VariantRule VariantRule

ViewType View

For more information about Mechatronics/PLM XML mapping, see the WiringHarness Design Tools Integration Guide.

B-2 PLM XML Export Import Administration Guide PLM00030 B1

Page 61: Plm Xml Import Export

Index

AAction rules . . . . . . . . . . . . . . . . . . . . 2-11Creating . . . . . . . . . . . . . . . . . . . . . 2-12Deleting . . . . . . . . . . . . . . . . . . . . . 2-13Editing . . . . . . . . . . . . . . . . . . . . . . 2-13

Action type . . . . . . . . . . . . . . . . . . 2-6, 2-14ApplicationRef element . . . . . . . . 2-28–2-29

BBasic concepts . . . . . . . . . . . . . . . . . . . 1-2Basic tasks . . . . . . . . . . . . . . . . . . . . . . 1-4Best practices . . . . . . . . . . . . . . . . . . . 2-27BOM lines . . . . . . . . . . . . . . . . . . . . . 2-29bom_cb switch . . . . . . . . . . . . . . . . . . 2-30Buttons . . . . . . . . . . . . . . . . . . . . . . . . 1-2

CClauses, property set . . . . . . . . . . . . . . 2-14Closure rule best practices . . . . . . . . . . 2-28Closure rules . . . . . . . . . . . . . . . . . . . . 2-1Creating . . . . . . . . . . . . . . . . . . . . . . 2-7Deleting . . . . . . . . . . . . . . . . . . . . . . 2-9Editing . . . . . . . . . . . . . . . . . . . . . . . 2-9Mapping attributes . . . . . . . . . . . . . . 2-9Syntax . . . . . . . . . . . . . . . . . . . . . . . 2-2

Conditional clauses . . . . . . . . . . . . . . . . 2-7Configuring PLM XML Export ImportAdministration . . . . . . . . . . . . . . . . . . 1-2ConventionsSyntax definitions . . . . . . . . . . . . . . . 1-5

DDesign . . . . . . . . . . . . . . . . . . . . . . . . 2-31

EEnabling PLM XML Export ImportAdministration . . . . . . . . . . . . . . . . . . 1-2Example . . . . . . . . . . . . . . . . . . . . . . . 2-18Export transfer mode example . . . . . . . 2-18Exporting BOM . . . . . . . . . . . . . . . . . 2-30Exporting JT files . . . . . . . . . . . . . . . . 2-27Exporting substitutes . . . . . . . . . . . . . 2-29

FFilter list . . . . . . . . . . . . . . . . . . . . . . 2-29Filter rules . . . . . . . . . . . . . . . . . . . . . 2-10Creating . . . . . . . . . . . . . . . . . . . . . 2-10Deleting . . . . . . . . . . . . . . . . . . . . . 2-11Editing . . . . . . . . . . . . . . . . . . . . . . 2-11Syntax . . . . . . . . . . . . . . . . . . . . . . . 2-2

GGetting started . . . . . . . . . . . . . . . . . . . 1-4

IImporting JT files . . . . . . . . . . . . . . . . 2-27ItemMaster forms . . . . . . . . . . . . . . . . 2-30

JJTDataExportDefault transfer mode . . . 2-27JTDataImportDefault transfer mode . . . 2-27

LLog file . . . . . . . . . . . . . . . . . . . . . . . . 2-29

MManaging action rules . . . . . . . . . . . . . 2-11Managing closure rules . . . . . . . . . . . . . 2-1Managing filter rules . . . . . . . . . . . . . . 2-10Managing property sets . . . . . . . . . . . . 2-13Managing transfer mode objects . . . . . . 2-16Mapping attributes . . . . . . . . . . . . . . . . 2-9Menus . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

NNamed references . . . . . . . . . . . . . . . . . 1-4

OOccurrences . . . . . . . . . . . . . . . . . . . . 2-31

PPart . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31Performance . . . . . . . . . . . . . . . . 2-27–2-29

PLM00030 B1 PLM XML Export Import Administration Guide Index-1

Page 62: Plm Xml Import Export

Index

PLM XML entity mapping . . . . . . . . . . B-2PLM XML export and import . . . . . . 1-3–1-4Prerequisites for PLM XML Export ImportAdministration . . . . . . . . . . . . . . . . . . 1-2Primary object selector . . . . . . . . . 2-2, 2-14Property set clauses . . . . . . . . . . . . . . 2-14Property sets . . . . . . . . . . . . . . . . . . . 2-13Creating . . . . . . . . . . . . . . . . . . . . . 2-15Deleting . . . . . . . . . . . . . . . . . . . . . 2-16Editing . . . . . . . . . . . . . . . . . . . . . . 2-16Syntax . . . . . . . . . . . . . . . . . . . . . . . 2-2

PublishLink . . . . . . . . . . . . . . . . . . . . 2-31

RRelation selector . . . . . . . . . . . . . . 2-3, 2-14Rule syntax . . . . . . . . . . . . . . . . . . . . . 2-2

SSaved option set . . . . . . . . . . . . . . . . . 2-29Secondary object selector . . . . . . . . . . . . 2-2SOS, see Saved option set

Starting PLM XML Export ImportAdministration . . . . . . . . . . . . . . . . . . 1-2Substitutes . . . . . . . . . . . . . . . . . . . . . 2-29Syntax definition conventions . . . . . . . . . 1-5

TTransfer mode best practices . . . . . . . . 2-27Transfer mode objects . . . . . . . . . . . . . . 2-1Creating . . . . . . . . . . . . . . . . . . . . . 2-16Deleting . . . . . . . . . . . . . . . . . . . . . 2-18Editing . . . . . . . . . . . . . . . . . . . . . . 2-17

Transfer option sets . . . . . . . . . . . . . . . 3-1Creating . . . . . . . . . . . . . . . . . . . . . . 3-2Deleting . . . . . . . . . . . . . . . . . . . . . . 3-3Editing . . . . . . . . . . . . . . . . . . . . . . . 3-3

Type identifiers . . . . . . . . . . . . . . . . . . 2-27

UUnloading objects . . . . . . . . . . . . . . . . 2-28User interface . . . . . . . . . . . . . . . . . . . . 1-2

Index-2 PLM XML Export Import Administration Guide PLM00030 B1