0% found this document useful (0 votes)
386 views

Data Loading

Data loading in old windchill versions

Uploaded by

Faisal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
386 views

Data Loading

Data loading in old windchill versions

Uploaded by

Faisal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 90

Windchill® Data Loading Reference

and Best Practices Guide

Windchill® 8.0
June 2005
Copyright © 2005 Parametric Technology Corporation. All Rights Reserved.

COPYRIGHT NOTICE DOCUMENTATION


User and training documentation from Parametric Technology Corporation (PTC) is subject to the copyright laws
of the United States and other countries and is provided under a license agreement that restricts copying,
disclosure, and use of such documentation. PTC hereby grants to the licensed user the right to make copies in
printed form of this documentation if provided on software media, but only for internal/personal use and in
accordance with the license agreement under which the applicable software is licensed. Any copy made shall
include the PTC copyright notice and any other proprietary notice provided by PTC. This documentation may not
be disclosed, transferred, modified, or reduced to any form, including electronic media, or transmitted or made
publicly available by any means without the prior written consent of PTC and no authorization is granted to make
copies for such purposes.

Information described herein is furnished for general information only, is subject to change without notice, and
should not be construed as a warranty or commitment by PTC. PTC assumes no responsibility or liability for any
errors or inaccuracies that may appear in this document.

The software described in this document is provided under written license agreement, contains valuable trade
secrets and proprietary information, and is protected by the copyright laws of the United States and other
countries. It may not be copied or distributed in any form or medium, disclosed to third parties, or used in any
manner not provided for in the software licenses agreement except with written prior approval from PTC.

UNAUTHORIZED USE OF SOFTWARE OR ITS DOCUMENTATION CAN RESULT IN CIVIL DAMAGES


AND CRIMINAL PROSECUTION.

Registered Trademarks of Parametric Technology Corporation or a Subsidiary


Advanced Surface Design, Behavioral Modeling, CADDS, Computervision, CounterPart, Create Collaborate
Control, EPD, EPD.Connect, Expert Machinist, Flexible Engineering, GRANITE, HARNESSDESIGN,
Info*Engine, InPart, MECHANICA, Optegra, Parametric Technology, Parametric Technology Corporation,
PartSpeak, PHOTORENDER, Pro/DESKTOP, Pro/E, Pro/ENGINEER, Pro/HELP, Pro/INTRALINK,
Pro/MECHANICA, Pro/TOOLKIT, Product First,

Product Development Means Business, Product Makes the Company, PTC, the PTC logo, PT/Products, Shaping
Innovation, The Way to Product First, and Windchill.

Trademarks of Parametric Technology Corporation or a Subsidiary


3DPAINT, Associative Topology Bus, AutobuildZ, CDRS, CV, CVact, CVaec, CVdesign, CV-DORS, CVMAC,
CVNC, CVToolmaker, EDAcompare, EDAconduit, DataDoctor, DesignSuite, DIMENSION III,
Distributed Services Manager, DIVISION, e/ENGINEER, eNC Explorer, Expert Framework, Expert MoldBase,
Expert Toolmaker, Harmony, InterComm, InterComm Expert, InterComm EDAcompare, InterComm
EDAconduit, ISSM, KDiP, Knowledge Discipline in Practice, Knowledge System Driver, ModelCHECK,
MoldShop, NC Builder, Pro/ANIMATE, Pro/ASSEMBLY, Pro/CABLING, Pro/CASTING, Pro/CDT, Pro/CMM,
Pro/COLLABORATE, Pro/COMPOSITE, Pro/CONCEPT, Pro/CONVERT, Pro/DATA for PDGS,
Pro/DESIGNER, Pro/DETAIL, Pro/DIAGRAM, Pro/DIEFACE, Pro/DRAW, Pro/ECAD, Pro/ENGINE,
Pro/FEATURE, Pro/FEM-POST, Pro/FICIENCY, Pro/FLY-THROUGH, Pro/HARNESS, Pro/INTERFACE,
Pro/LANGUAGE, Pro/LEGACY, Pro/LIBRARYACCESS, Pro/MESH, Pro/Model.View, Pro/MOLDESIGN,
Pro/NC-ADVANCED, Pro/NC-CHECK, Pro/NCMILL, Pro/NCPOST, Pro/NC-SHEETMETAL,
Pro/NC-TURN, Pro/NC-WEDM, Pro/NC-Wire EDM, Pro/NETWORK ANIMATOR, Pro/NOTEBOOK,
Pro/PDM, Pro/PHOTORENDER, Pro/PIPING, Pro/PLASTIC ADVISOR, Pro/PLOT, Pro/POWER DESIGN,
Pro/PROCESS, Pro/REPORT, Pro/REVIEW, Pro/SCAN-TOOLS, Pro/SHEETMETAL, Pro/SURFACE,
Pro/VERIFY, Pro/Web.Link, Pro/Web.Publish, Pro/WELDING, ProductView, PTC Precision,
Routed Systems Designer Shrinkwrap, Simple Powerful Connected, The Product Development Company,
Wildfire, Windchill DynamicDesignLink, Windchill PartsLink, Windchill PDMLink, Windchill ProjectLink, and
Windchill SupplyLink.
Patents of Parametric Technology Corporation or a Subsidiary
Additionally, equivalent patents may be issued or pending outside of the United States. Contact PTC for further
information..

GB236320825-August-2004 6,545,671 B108-April-2003 5,423,02305-June-1990


GB 236556710-March-2004 GB2354685B18-June-2003 4,310,61521-December-1998
6,665,569 B116-December-2003 GB2354683B04-June-2003 4,310,61430-April-1996
GB 235311510December-2003 6,608,623 B119 August 2003 4,310,614 22-April-1999
6,625,607 B123-September-2003 6,473,673 B129-October-2002 5,297,05322-March-1994
6,580,428 B117-June-2003 GB2354683B04-June-2003 5,513,31630-April-1996
GB2354684B02-July-2003 6,447,223 B110-Sept-2002 5,689,71118-November-1997
GB238412515-October-2003 6,308,14423-October-2001 5,506,95009-April-1996
GB235409612-November-2003 5,680,52321-October-1997 5,428,77227-June-1995
GB235492424-September-2003 5,838,33117-November-1998 5,850,53515-December-1998
6,608,623 B119 August 2003 4,956,77111-September-1990 5,557,17609-November-1996
GB235337605-November-2003 5,058,00015-October-1991 5,561,74701-October-1996
GB235468615-October-2003 5,140,32118-August-1992

Third-Party Trademarks
Adobe, Acrobat, Distiller and the Acrobat Logo are trademarks of Adobe Systems Incorporated.
Advanced ClusterProven, ClusterProven, and the ClusterProven design are trademarks or registered trademarks
of International Business Machines Corporation in the United States and other countries and are used under
license. IBM Corporation does not warrant and is not responsible for the operation of this software product. AIX
is a registered trademark of IBM Corporation. Allegro, Cadence, and Concept are registered trademarks of
Cadence Design Systems, Inc. Apple, Mac, Mac OS, and Panther are trademarks or registered trademarks of
Apple Computer, Inc. AutoCAD and Autodesk Inventor are registered trademarks of Autodesk, Inc. Baan is a
registered trademark of Baan Company. CADAM and CATIA are registered trademarks of Dassault Systemes.
COACH is a trademark of CADTRAIN, Inc. DOORS is a registered trademark of Telelogic AB. FLEXlm is a
trademark of Macrovision Corporation. Geomagic is a registered trademark of Raindrop Geomagic, Inc.
EVERSYNC, GROOVE, GROOVEFEST, GROOVE.NET, GROOVE NETWORKS, iGROOVE, PEERWARE,
and the interlocking circles logo are trademarks of Groove Networks, Inc. Helix is a trademark of Microcadam,
Inc. HOOPS is a trademark of Tech Soft America, Inc. HP-UX is a registered trademark Hewlett-Packard
Company. I-DEAS, Metaphase, Parasolid, SHERPA, Solid Edge, and Unigraphics are trademarks or registered
trademarks of UGS Corp. InstallShield is a registered trademark and service mark of InstallShield Software
Corporation in the United States and/or other countries. Intel is a registered trademark of Intel Corporation. IRIX
is a registered trademark of Silicon Graphics, Inc. LINUX is a registered trademark of Linus Torvalds, MainWin
and Mainsoft are trademarks of Mainsoft Corporation. MatrixOne is a trademark of MatrixOne, Inc.
Mentor Graphics and Board Station are registered trademarks and 3D Design, AMPLE, and Design Manager are
trademarks of Mentor Graphics Corporation. MEDUSA and STHENO are trademarks of CAD Schroer GmbH.
Microsoft, Microsoft Project, Windows, the Windows logo, Windows NT, Visual Basic, and the Visual Basic
logo are registered trademarks of Microsoft Corporation in the United States and/or other countries. Netscape
and the Netscape N and Ship's Wheel logos are registered trademarks of Netscape Communications Corporation
in the U.S. and other countries. Oracle is a registered trademark of Oracle Corporation. OrbixWeb is a registered
trademark of IONA Technologies PLC. PDGS is a registered trademark of Ford Motor Company. RAND is a
trademark of RAND Worldwide. Rational Rose is a registered trademark of Rational Software Corporation.
RetrievalWare is a registered trademark of Convera Corporation. RosettaNet is a trademark and
Partner Interface Process and PIP are registered trademarks of RosettaNet, a nonprofit organization. SAP and R/3
are registered trademarks of SAP AG Germany. SolidWorks is a registered trademark of SolidWorks
Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of
SPARC International, Inc. in the United States and in other countries. Products bearing SPARC trademarks are
based upon an architecture developed by Sun Microsystems, Inc. Sun, Sun Microsystems, the Sun logo, Solaris,
UltraSPARC, Java and all Java based marks, and "The Network is the Computer" are trademarks or registered
trademarks of Sun Microsystems, Inc. in the United States and in other countries. TIBCO, TIBCO Software,
TIBCO ActiveEnterprise, TIBCO Designer, TIBCO Enterprise for JMS, TIBCO Rendezvous,
TIBCO Turbo XML, TIBCO BusinessWorks are the trademarks or registered trademarks of TIBCO Software
Inc. in the United States and other countries. WebEx is a trademark of WebEx Communications, Inc.

Third-Party Technology Information


Certain PTC software products contain licensed third-party technology: Rational Rose 2000E is copyrighted
software of Rational Software Corporation. RetrievalWare is copyrighted software of Convera Corporation.
VisTools library is copyrighted software of Visual Kinematics, Inc. (VKI) containing confidential trade secret
information belonging to VKI. HOOPS graphics system is a proprietary software product of, and is copyrighted
by, Tech Soft America, Inc. G-POST is copyrighted software and a registered trademark of Intercim. VERICUT
is copyrighted software and a registered trademark of CGTech. Pro/PLASTIC ADVISOR is powered by
Moldflow technology. Moldflow is a registered trademark of Moldflow Corporation. MainWin Dedicated
Libraries are copyrighted software of Mainsoft Corporation. Certain software provided by TIBCO Software Inc.
The JPEG image output in the Pro/Web.Publish module is based in part on the work of the independent JPEG
Group. DFORMD.DLL is copyrighted software from Compaq Computer Corporation and may not be
distributed. METIS, developed by George Karypis and Vipin Kumar at the University of Minnesota, can be
researched at http://www.cs.umn.edu/~karypis/metis. METIS is © 1997 Regents of the University of Minnesota.
LightWork Libraries are copyrighted by LightWork Design 1990-2001. Visual Basic for Applications and
Internet Explorer is copyrighted software of Microsoft Corporation. Parasolid © UGS Corp. Windchill
Info*Engine Server contains IBM XML Parser for Java Edition and the IBM Lotus XSL Edition. Pop-up
calendar components Copyright © 1998 Netscape Communications Corporation. All Rights Reserved.
TECHNOMATIX is copyrighted software and contains proprietary information of Technomatix Technologies
Ltd. TIBCO ActiveEnterprise, TIBCO Designer, TIBCO Enterprise for JMS, TIBCO Rendezvous,
TIBCO Turbo XML, TIBCO BusinessWorks are provided by TIBCO Software Inc.
Technology "Powered by Groove" is provided by Groove Networks, Inc. Technology "Powered by WebEx" is
provided by WebEx Communications, Inc. Oracle 8i run-time and Oracle 9i run-time, Copyright 2002-2003
Oracle Corporation. Oracle programs provided herein are subject to a restricted use license and can only be used
in conjunction with the PTC software they are provided with. Apache Server, Tomcat, Xalan, Xerces and Jakarta
are technologies developed by, and are copyrighted software of, the Apache Software Foundation
(http://www.apache.org/) - their use is subject to the terms and limitations of the Apache License at:
http://www.apache.org. Adobe Acrobat Reader and Adobe Distiller are copyrighted software of Adobe Systems
Inc. and is subject to the Adobe End-User License Agreement as provided by Adobe with those products.
UnZip (© 1990-2001 Info-ZIP, All Rights Reserved) is provided "AS IS" and WITHOUT WARRANTY OF
ANY KIND. For the complete Info ZIP license see ftp://ftp.info-zip.org/pub/infozip/license.html.
The Java™ Telnet Applet (StatusPeer.java, TelnetIO.java, TelnetWrapper.java, timedOutException.java),
Copyright © 1996, 97 Mattias L. Jugel, Marcus Meißner, is redistributed under the GNU General Public License.
This license is from the original copyright holder and the Applet is provided WITHOUT WARRANTY OF ANY
KIND. You may obtain a copy of the source code for the Applet at http://www.mud.de/se/jta (for a charge of no
more than the cost of physically performing the source distribution), by sending e-mail to [email protected] or
[email protected] are allowed to choose either distribution method. The source code is likewise provided
under the GNU General Public License. GTK+ - The GIMP Toolkit are licensed under the GNU Library General
Public License (LGPL). You may obtain a copy of the source code at http://www.gtk.org/, which is likewise
provided under the GNU LGPL. zlib software Copyright © 1995-2002 Jean-loup Gailly and Mark Adler. May
include cryptographic software written by Eric Young ([email protected]). OmniORB is distributed under the
terms and conditions of the GNU. The Java Getopt.jar, copyright 1987-1997 Free Software Foundation, Inc.;
Java Port copyright 1998 by Aaron M. Renn ([email protected]), is redistributed under the GNU LGPL.
You may obtain a copy of the source code at: http://www.urbanophile.com/arenn/hacking/download.html. The
source code is likewise provided under the GNU LGPL. This product may include software developed by the
OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/): Copyright (c) 1998-2003 The
OpenSSL Project. All rights reserved. This product may include cryptographic software written by Eric Young
([email protected]). Gecko and Mozilla components are subject to the Mozilla Public License Version 1.1 at
http://www.mozilla.org/MPL/. Software distributed under the Mozilla Public License (MPL) is distributed on an
"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the MPL for the
specific language governing rights and limitations. Mozilla Japanese localization components are subject to the
Netscape Public License Version 1.1 (at http://www.mozilla.org/NPL/). Software distributed under Netscape
Public License (NPL) is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
express or implied (see the NPL for rights and limitations that are governing different languages). The Original
Code is Mozilla Communicator client code, released March 31, 1998 and the Initial Developer of the Original
Code is Netscape Communications Corporation. Portions created by Netscape are Copyright (c) 1998 Netscape
Communications Corporation. All Rights Reserved. Contributor(s): Kazu Yamamoto <[email protected]>;
Ryoichi Furukawa <[email protected]>; Tsukasa Maruyama <[email protected]>; Teiji Matsuba
<[email protected]>.

UNITED STATES GOVERNMENT RESTRICTED RIGHTS LEGEND


This document and the software described herein are Commercial Computer Documentation and Software,
pursuant to FAR 12.212(a)-(b) (OCT'95) or DFARS 227.7202-1(a) and 227.7202-3(a) (JUN'95), and are
provided to the US Government under a limited commercial license only. For procurements predating the above
clauses, the use, duplication, or disclosure by the Government is subject to the restrictions set forth in
subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software Clause at DFARS 252.227-7013
(OCT'88) or Commercial Computer Software-Restricted Rights at FAR 52.227-19(c)(1)-(2) (JUN'87), as
applicable.

Parametric Technology Corporation, 140 Kendrick Street, Needham, MA 02494 USA 010505
Contents

Change Record ..................................................................................................... xi

About This Guide................................................................................................ xiii


Related Documentation ...............................................................................................................xiii
Technical Support........................................................................................................................xiii
Documentation for PTC Products............................................................................................... xiv
Comments .................................................................................................................................. xiv
Documentation Conventions ...................................................................................................... xiv
Third-Party Products ............................................................................................................. xv
Code Examples .................................................................................................................... xv

Introduction to Data Loading and the LoadFromFile Framework.................. 1-1


Overview of Load Utilities ...........................................................................................................1-2
About the LoadFromFile Framework ................................................................................... 1-2
About the Windchill Loader .................................................................................................. 1-4
About the LoadFromFile and LoadFileSet Utilities .............................................................. 1-4
When Do I Use LoadFromFile and Import/Export? ....................................................................1-5
Existing Load Methods ...............................................................................................................1-6
More About wt.doc.LoadDoc.beginCreateWTDocument ..................................................... 1-9
More About wt.part.LoadPart.beginCreateWTPart .............................................................. 1-9

Preparing Data for Loading ............................................................................... 2-1


The Data Loading Process .........................................................................................................2-2
Data Cleansing: Overview of the Tools Available.......................................................................2-3
Text Editors: Pros and Cons ................................................................................................ 2-3
Microsoft Excel: Pros and Cons........................................................................................... 2-4
Custom Code: Pros and Cons ............................................................................................. 2-5
Windchill CounterPart: Pros and Cons ................................................................................ 2-6
Working with a Sample Data Set................................................................................................2-7
Creating Data Extraction and Format Requirements..................................................................2-8
Developing Load Metrics ..................................................................................................... 2-8

Using the CSV2XML Utility and Validating the XML Format .......................... 3-1
About the CSV2XML Utility.........................................................................................................3-2
Converting CSV Files for Multibyte Operating Systems .............................................................3-2

Contents vii
Converting CSV Files to XML Format Files ............................................................................... 3-2
Working with Larger Files .......................................................................................................... 3-3
CSV2XML Arguments ................................................................................................................ 3-3
Validating the XML Format ........................................................................................................ 3-5
Selecting the Appropriate DTD at Runtime ......................................................................... 3-5
Using XML Spy to Validate the Data Files .......................................................................... 3-6

Loading Legacy Data Using the LoadFromFile and LoadFileSet Utilities..... 4-1
Overview: Data Loading Utilities ................................................................................................ 4-2
Using the LoadFromFile Utility ................................................................................................... 4-2
Sample Command Lines ..................................................................................................... 4-4
More About CONT_PATH ................................................................................................... 4-4
Using the LoadFileSet Utility ...................................................................................................... 4-5
About the Load Files .................................................................................................................. 4-6
Load Set File ....................................................................................................................... 4-6
Sample Load Set File .......................................................................................................... 4-7
Object XML Files ................................................................................................................. 4-7
Loading Legacy Data ................................................................................................................. 4-8
Working with Containers ............................................................................................................ 4-9
Containers in PDM and Windchill PDMLink ........................................................................ 4-9

Creating Load Methods ...................................................................................... 5-1


Customizing Loading ................................................................................................................. 5-2
About the csvmapfile.txt File ............................................................................................... 5-2
Modifying Data Files .................................................................................................................. 5-3
Method 1: Modifying XML Load Files Directly ..................................................................... 5-3
Method 2: Modifying CSV Files and Propagating Changes to XML and DTD Files ............ 5-4
Creating New Methods for Loading ........................................................................................... 5-5
About Load Methods ........................................................................................................... 5-5
Creating a Document Class ................................................................................................ 5-7
Creating a Part Class .......................................................................................................... 5-8

Loading Product Objects and Parts: Windchill PDMLink Example ............... 6-1
Before You Begin ....................................................................................................................... 6-2
Running the LoadFromFile Utility ........................................................................................ 6-2
Loading Users ............................................................................................................................ 6-5
Creating Organizations .............................................................................................................. 6-5
Creating Product Containers...................................................................................................... 6-6
Creating Assemblies ......................................................................................................... 6-10

viii Windchill Data Loading Reference and Best Practices Guide


Creating Library Containers......................................................................................................6-12
Loading Documents in a Library ........................................................................................ 6-14
Loading Documents that Are Soft Types of an Out-of-the-box Type ................................. 6-16
Loading Product Objects and Parts..........................................................................................6-17
Loading Parts with Specific Lifecycle and Team Templates.............................................. 6-24
Loading Relationships Between Parts and Documents............................................................6-26
Tag Descriptions ................................................................................................................ 6-27

Loading Documents: Pro/INTRALINK 8.0 Example......................................... 7-1


Loading Documents in a Pro/INTRALINK 8.0 System ...............................................................7-2
Sample Data File for Pro/INTRALINK ........................................................................................7-2

Contents ix
x Windchill Data Loading Reference and Best Practices Guide
Change Record

Table 1 Changes for Release 8.0 (from Release 7.0 M020)

Change Description

Changed references from Global change in guide to update


standard70.dtd to standardX05.dtd references to the new DTD file.

Loading Documents: Added chapter containing example for


Pro/INTRALINK 8.0 Example loading documents to
Pro/INTRALINK 8.0 system.

Creating a Document Class Support for out of sequence iterations


and versions. wt.doc.LoadDoc can
handle loading out of sequence
iterations and versions. Refer to the
JavaDoc for information on the
beginCreateWTDocument class.

Creating a Part Class Support for out of sequence iterations


and versions. wt.part.LoadPart can
handle loading out of sequence
iterations and versions. Refer to the
JavaDoc for information on the
beginCreateWTPart class.

xi
xii Windchill Data Loading Reference and Best Practices Guide
About This Guide

The Windchill Data Loading Reference and Best Practices Guide provides a
detailed description of the LoadFromFile framework and the LoadFromFile,
LoadFileSet, and CSV2XML utilities. It also provides best practices for preparing
and loading legacy data, with specific examples for a Windchill PDMLink and
Pro/INTRALINK 8.0 system.

Related Documentation
The following documentation may be helpful:
• Windchill Installation and Configuration Guide -- Windchill
• Windchill Customizer’s Guide
• Getting Started with Pro/INTRALINK 8.0
If these books are not installed on your system, see your system administrator.

Technical Support
Contact PTC Technical Support via the PTC Web site, phone, fax, or e-mail if you
encounter problems using Windchill.
For complete details, refer to Contacting Technical Support in the PTC Customer
Service Guide enclosed with your shipment. This guide can also be found under
the Support Bulletins section of the PTC Web site at:
http://www.ptc.com/support/index.htm
The PTC Web site also provides a search facility that allows you to locate
Technical Support technical documentation of particular interest. To access this
page, use the following link:
http://www.ptc.com/support/support.htm
You must have a Service Contract Number (SCN) before you can receive
technical support. If you do not have an SCN, contact PTC License Management
using the instructions found in your PTC Customer Service Guide under
Contacting License Management.

xiii
Documentation for PTC Products
PTC provides documentation in the following forms:
• Help topics
• PDF books
To view and print PDF books, you must have the Adobe Acrobat Reader installed.
All Windchill documentation is included on the CD for the application. In
addition, books updated after release (for example, to support a hardware platform
certification) are available from the Reference Documents section of the PTC
Web site at the following URL:
http://www.ptc.com/appserver/cs/doc/refdoc.jsp

Comments
PTC welcomes your suggestions and comments on its documentation—send
comments to the following address:
[email protected]
Please include the name of the application and its release number with your
comments. For online books, provide the book title.

Documentation Conventions
Windchill documentation uses the following conventions:

Convention Item Example

Bold Names of elements in the user Click OK.


interface such as buttons, menu paths,
Select File > Save.
and dialog box titles.
License File dialog box
Required elements and keywords or
characters in syntax formats. create_<tablename>.sql

Italic Variable and user-defined elements in create_<tablename>.sql


syntax formats. Angle brackets (< and
>) enclose individual elements.
Monospace Examples JavaGen "wt.doc.*" F true

Messages Processing completed.

"Quotation Strings The string "UsrSCM" . . .


marks"

xiv Windchill Data Loading Reference and Best Practices Guide


Convention Item Example

The CAUTION symbol indicates When you add a value to an enumerated


potentially unsafe situations which type (for example, by adding a role in the
may result in minor injury, machine RolesRB.java resource file), removing that
damage or downtime, or corruption or value can result in a serious runtime error.
loss of software or data. Do not remove a role unless you are certain
there is no reference to it within the
system.

Third-Party Products
Examples in this guide referencing third-party products are intended for
demonstration purposes only. For additional information about third-party
products, contact individual product vendors.

Code Examples
Some code examples in this guide have been reformatted for presentation
purposes and, therefore, may contain hidden editing characters (such as tabs and
end-of-line characters) and extraneous spaces. If you cut and paste code from this
manual, check for these characters and remove them before attempting to use the
example in your application.

About This Guide xv


xvi Windchill Data Loading Reference and Best Practices Guide
1
Introduction to Data Loading
and the LoadFromFile
Framework

This chapter provides an overview of the Windchill data loading utilities.

Section Page
Overview of Load Utilities..................................................................................1-2
When Do I Use LoadFromFile and Import/Export? ...........................................1-5
Existing Load Methods .......................................................................................1-6

Introduction to Data Loading and the LoadFromFile Framework 1-1


Overview of Load Utilities
Migrating legacy data into a new Windchill implementation is a fundamental
requirement of any system implementation, yet historically it has been a laborious
manual task. The same can be said about merging information from a new
acquisition into a PDM environment, including Windchill.
PTC offers the LoadfromFile framework.to help with these activities.
The wt.load package is a set of framework utilities for loading demonstration or
test data. It can be expanded to load new classes. The LoadFromFile utility is
callable from both the command line and from other classes.

Loading Data in Pro/INTRALINK 8.0


Pro/INTRALINK is a data management solution designed to efficiently facilitate
Pro/ENGINEER workgroup collaboration. Pro/INTRALINK 8.0 is the latest
version of Pro/INTRALINK, now based on the PTC Windchill platform.
In Pro/INTRALINK 8.0, you use PDM capabilities to manage CAD documents
and documents. Pro/INTRALINK supports loading of documents, but does not
support loading of CAD documents via the LoadFromFile framework.
For a detailed example of loading documents in Pro/INTRALINK, refer to
Loading Documents: Pro/INTRALINK 8.0 Example.

About the LoadFromFile Framework


The Windchill LoadFromFile framework performs the work of reading data from
files and converting it to name-value pairs (represented as Hashtable), which are
processed by the object loaders. In addition, the load framework provides some
helper methods, which can be used by the loaders. Object loaders perform the
actual work of creating the object, setting attributes on it and persisting it to the
database.
Starting with Windchill Release 7.0, the framework uses some classes from the
Import/Export framework. However, in most cases, the 'worker' classes (that is,
object loaders for load and object handlers for Import/Export) are separate, and
expect data in different XML format. In other words, the XML schema is
different.
LoadFromFile is a framework that can be used to load data into your own site
classes. The wt.doc.LoadDoc.java source file is included as an example of how to
use the load package.

1-2 Windchill Data Loading Reference and Best Practices Guide


LoadFromFile in the main or command line call, or the doFileLoad method call,
use the following parameters to load data into the system:
• Data File
Contains data to be loaded and resides on the method server host. The data file
is a required parameter. If the string is null or not on the command line, the
load fails. It is recommended that you include the full path name of the file. If
the full path is not provided, however, the method attempts to read the file in
the directory in which the load was started.
• Map File
Used in the mapping of attribute names to the sequence of data in the data file.
It also contains the method to call to load the data. If the string is null, the
method tries to use the value of wt.load.defaultMapFile from the wt.properties
file. If that is also null, the default is wt.home\loadFiles\csvmapfile.txt where
wt.home is from wt.properties. If there is no file to match, the load fails.
• Token
Used to delimit fields of data in the data file. If the token string is null, an
attempt is made to get wt.load.defaultToken from wt.properties. If that also
returns null, then ',' is used.
• Method
A string used with the object name (the first field) from the data file to key
into the map file. The line in the map file then contains the method name to
which this information is passed and the ordered list of field names to match
with the line in the data file. If the input string for method is null, the default is
'create'.
• User
Specifies the user to execute the method if no user is given in the line from the
data file. The command line does not use the -u user option so no user is
preset. The main in LoadFromFile calls SessionHelper.manager.
getPrincipal() to prompt for a user and perform the authentication. The
doFileLoad still has the user passed in but it can be null. Demo and Developer
authenticate before they call doFileLoad. It is recommended that you
authenticate a user before calling doFileLoad, because it does not authenticate
the user. The user would eventually be authenticated when the server side
attempts to setPrincipal using the user passed in from doFileLoad, but the
error messaging is best handled on the client side before calling doFileLoad.
To run LoadFromFile from the command line, be sure that the server manager and
method server are running and then call:
windchill wt.load.LoadFromFile -d c:\ptc\Windchill\loadfiles\
ReqDocs.xml

Introduction to Data Loading and the LoadFromFile Framework 1-3


About the Windchill Loader
The Windchill Loader can load data for any of the installed Windchill solutions.
The utility obtains a list of the installed solutions from the installed.properties file;
which is updated when a solution is installed, and the loadsets for the base and
demonstration data from the LoaderConfiguration.properties file. The loadsets are
XML files that list the data files that must be loaded to support a Windchill
solution.
Each solution has its own set of base and demonstration data. There is also a base
data set (foundation) that applies to all of the solutions. The foundation base data
is automatically installed along with the solution-specific base data.
In addition to initializing the database, the load utility will also add users and
groups to the LDAP directory services as specified in the
wt.federation.ie.ldapServer property setting in the wt.properties file.
For more information on the Windchill Loader and for instructions on initializing
and populating the Windchill database with test data, refer to the Windchill
Installation and Configuration Guide.

About the LoadFromFile and LoadFileSet Utilities


In addition to the demonstration data that PTC provides, you may also have
legacy data that you would like added to the Windchill database. PTC provides
two utilities to load legacy data., LoadFromFile and LoadFileSet.
The load utilities only process XML files.The CSV2XML utility is used to
convert CSV files to XML formatted files. The LoadFromFile utility loads a
single, legacy data file into the database, whereas, the LoadFileSet utility loads
multiple data files.
Refer to Loading Legacy Data Using the LoadFromFile and LoadFileSet Utilities
later in this guide for information on using these utilities.

1-4 Windchill Data Loading Reference and Best Practices Guide


When Do I Use LoadFromFile and Import/Export?
LoadFromFile, LoadFileSet, and the Import/Export framework are tools for
moving data. Simply put, LoadFromFile is used for loading a single file into a
Windchill system during the initial set up of the system. LoadFileSet is used for
loading multiple files into a Windchill system during the initial set up of the
system. And lastly, the Import/Export framework is for data exchange between
two existing systems.
LoadFromFile/LoadFileSet and Import/Export support different object types.
Refer to the table below to see which tool supports a given object type.

Supported by
Object Loader Import/Export?

Data Formats LoadDataFormat No


Documents LoadDoc Yes
Effectivity LoadEffectivity No
Folders LoadFolder No
Values LoadValue Yes
Index Rules LoadIndexRule No
Containers LoadContainer No
Container Teams LoadContainerTeam No
Container Templates LoadContainerTemplat No
e
Life Cycles LoadLifeCycle Yes (separate user
interface)
Content LoadContent Yes
Parts LoadPart Yes
Preferences LoadPrefEntry No
Report Templates LoadReportTemplate No
Teams LoadTeam No
Views LoadView No
Workflows LoadWorkflow Yes
Notebooks LoadNotebook No
Users LoadUser No
CAD Documents N/A Yes

Introduction to Data Loading and the LoadFromFile Framework 1-5


Existing Load Methods
The best way to see what methods are available to load with on your system is to
look at the loadFiles.csvmapfile.txt file. The following is a brief directory of the
methods available for loading data in the system. Full method paths are given to
allow you to look them up in the JavaDoc.
• wt.doc.LoadDoc.createGeneral
(Legacy method to support existing systems.) Loads General documents; adds
one content file and caches the General created for additional content
additions. Left here for legacy systems only.
• wt.doc.LoadDoc.createReq
(Legacy method to support existing systems.)Loads Requirements
documents; adds one content file and caches the Requirements created for
additional content additions.
• wt.doc.LoadDoc.createSpec
(Legacy method to support existing systems.) Loads Specification documents;
adds one content file and caches the Specification created for additional
content additions.
• wt.load.LoadDoc.beginCreateWTDocument
Loads WTDocuments, soft types, and soft attributes. Supports versioning to
allow a document to be created at a specified version and iteration. See More
About wt.doc.LoadDoc.beginCreateWTDocument below for more
information.
• wt.load.LoadContent.createContentURL
Adds a content URL to a cached content holder.
• wt.load.LoadContent.createContentFile
Adds a content file to a cached content holder.
• wt.load.LoadContent.setDefaultDirectory
Sets a default directory where content can be found. It is in effect until the
next setDefaultDirectory or the end of the data file.
• wt.load.LoadContent.setDefaultURL
Sets a default portion of the URL where content can be found. It is in effect
until the next setDefaultURL or the end of the data file.
• wt.folder.LoadFolder.createCabinet
Creates a cabinet. It is used mainly for initializing the system. User cabinets
are created automatically when a user is created.

1-6 Windchill Data Loading Reference and Best Practices Guide


• wt.folder.LoadFolder.createSubFolder
Creates a subfolder.
• wt.folder.LoadFolder.createFolderShortcut
Creates a folder shortcut.
• wt.load.LoadUser.createUser
Creates a new user.
• wt.load.LoadUser.createGroup
Creates a new group.
• wt.load.LoadUser.createUserGroup
Adds a user to a group.
• wt.load.LoadUser.createDomain
Creates a new domain.
• wt.load.LoadUser.createAccessRule
Adds an access rule.
• wt.part.LoadPart.createPart
Creates a part.
• wt.part.LoadPart.addPartToAssembly
Adds a part to an assembly in a "uses" relationship.
• wt.part.LoadPart.createPartDocReference
Creates a "references" relationship between a part and an existing document.
• wt.part.LoadPart.beginCreateWTPart
Loads WTParts, soft types and soft attributes. Supports versioning to allows a
part to be created at a specified version and iteration. See More About
wt.part.LoadPart.beginCreateWTPart below for more information.
• wt.index.LoadIndexRule.createIndexRule
Creates index rules for searches.
• wt.lifecycle.LoadLifeCycle.createLifeCycleTemplate
Creates a life cycle template.
• wt.project.LoadProject.createIndirectRoleHolder
Creates a role-to-role mapping.

Introduction to Data Loading and the LoadFromFile Framework 1-7


• wt.project.LoadProject.createRoleHolder
Creates a role-to-principal mapping.
• wt.project.LoadProject.createActorRoleHolder
Creates a role-to-actor role mapping. Actor roles are derived users, such as
"Creator".
• wt.lifecycle.LoadLifeCycle.createCriterion
Creates permission criterion for life cycle phase.
• wt.lifecycle.LoadLifeCycle.createPhaseTemplateBegin and
wt.lifecycle.LoadLifeCycle.createPhaseTemplateEnd
Creates a phase.
• wt.project.LoadProject.createProjectBegin and
wt.project.LoadProject.createProjectEnd
Creates a project.
• wt.lifecycle.LoadLifeCycle.createWTAclEntry
Creates ad hoc access control for a life cycle phase.
• wt.content.LoadDataFormat.createDataFormat
Adds data formats used in load content files.
• wt.effectivity.ConfigurationItem.createConfigurationItem
Loads a configuration item. A configuration item is necessary for lot number
effectivity and serial number effectivity, but is optional for date effectivity.
• wt.effectivity.WTDatedEffectivity.createWTDatedEffectivity
Loads a date effectivity. The effectivity will be associated with the WTPart
object that was loaded last.
• wt.effectivity.WTSerialNumberedEffectivity.createWTSerialNumbered
Effectivity
Loads a serial number effectivity. The effectivity will be associated with the
WTPart object that was loaded last.
• wt.effectivity.WTLotEffectivity.createWTLotEffectivity
Loads a lot effectivity. The effectivity will be associated with the WTPart
object that was loaded last.

1-8 Windchill Data Loading Reference and Best Practices Guide


More About wt.doc.LoadDoc.beginCreateWTDocument
Supports versioning to allow a document to be created at a specified version and
iteration. Multiple document versions imply an "order". For example, subsequent
bulk load runs can "fill in the gaps", but it does so by attaching to the latest
iteration of the previous version.
If a newer iteration is added to the previous version, the new version will attached
to the new latest iteration. For example:
Load set 1 (E.1, A.1, C.2) will result in (A.1, C.2, E.1).
The predecessors of: C.2 is A.1, E.1 is C.2.
Load set 2 (B.1, A.2., C.1, C.3) will result in (A.1, A.2, B.1, C.1, C.2, C.3, E.1).
The predecessors of: B.1 is A.2, C.1 is B.1, E.1 is C.3.
The Iteration History page of B.1 will show both A.2 and A.1
The Iteration History page of C.1 will show B.1, A.2 and A.1
The Iteration History page of E.1 will show C.3, C.2, C.1, B.1, A.2 and A.1
Any new version/iterations added will continue to change the predecessor links to
the new latest iteration of the previous version.

Note: Versioning does support gaps in the ordering.

Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)

More About wt.part.LoadPart.beginCreateWTPart


Supports versioning which allows a part to be created at a specified version and
iteration. Multiple part versions imply an "order". I.E. subsequent bulk load runs
can "fill in the gaps", but it does so by attaching to the latest iteration of the
previous version. If a newer iteration is added to the previous version, the new
version will attached to the new latest iteration.
For example: Load set 1 (E.1, A.1, C.2) will result in (A.1, C.2, E.1).
The predecessors of: C.2 is A.1, E.1 is C.2. Load set 2 (B.1, A.2., C.1, C.3) will
result in (A.1, A.2, B.1, C.1, C.2, C.3, E.1).
The predecessors of: B.1 is A.2, C.1 is B.1, E.1 is C.3.
The Iteration History page of B.1 will show both A.2 and A.1
The Iteration History page of C.1 will show B.1, A.2 and A.1
The Iteration History page of E.1 will show C.3, C.2, C.1, B.1, A.2 and A.1
Any new version/iterations added will continue to change the predecessor links to
the new latest iteration of the previous version.

Introduction to Data Loading and the LoadFromFile Framework 1-9


Note: Versioning does support gaps in the ordering.

Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)


When loading versions out of sequence and loading relationships to those parts
there are a few things that you should understand while ordering your data:
• Relationships are copied forward from what is identified as the predecessor to
the new version. So in an ordered case if you create part 1 A.1 that has
references or a describe relationship to doc 2. Then you revise to get part 1
B.1, it will have the relationships of A.1 copied to it so it will have the
relationship to doc 2 as well.
• Relationships are not copied forward if they are created after the new version
has already been created. For example if part 1 A.1 and B.1 are created and
then part A.1 has a relationship created to doc 2, part 1 B.1 will not have the
relationship to doc 2 copied to it. You must explicitly create that relationship
if you want it created.
• Relationships from predecessors are not cumulative. This is really just a
further clarification of the first point. Relationships are only copied from the
one identified predecessor and not the accumulation of predecessors. So if
you create part 1 B.1 that is related to doc 2, create part 1 A.1 that is related to
doc 3 and then create part 1 C.1 it will inherit the relationship to doc 2 only.
These are a few pointers to loading versions and relationships out of sequence.
There are other scenarios given these basic rules that can also be imagined. Order
the creation of versions/iterations and relationship very carefully in order to get
the results that you intend.

1-10 Windchill Data Loading Reference and Best Practices Guide


2
Preparing Data for Loading

This chapter describes the data loading process and the tool options for cleansing
legacy data prior to loading it to the Windchill database.

Section Page
The Data Loading Process...................................................................................2-2
Data Cleansing: Overview of the Tools Available..............................................2-3
Working with a Sample Data Set ........................................................................2-7
Creating Data Extraction and Format Requirements ..........................................2-8

Preparing Data for Loading 2-1


The Data Loading Process
The data loading process is fluid and changes depending on the data requirements.
The flow chart below shows a typical data loading process beginning with
analysis of the legacy system, continuing with data cleansing and extraction of a
sample data, and finishing with loading of data on to the live system. The steps in
this process are colorcoded to show the relationship between the customer and
PTC’s Global Service Representatives.

Tip: It is strongly recommended that PTC review the raw data prior to loading.
This ensures that resource bundles are properly prepared and data is of expected
format and length. When possible, data should be review and evaluated prior to
engagement activities.This also allows for proper time and resource estimates to
be created.

A typical data loading process is shown below.

In this process, there is a built in review process prior to loading the data. For
example, a data file of parts can be examined to produce a unique list of Part
Types. This list should then be compared against the PartTypeRB.rbInfo file.
Similarly, a unique list of part quantities can be compared to the
QuantityUnitRB.rbInfo file.

2-2 Windchill Data Loading Reference and Best Practices Guide


Tip: Data lengths should be examined as well. The Title field on the Document
Data load file must be less than 60 characters is one example of checking data
lengths.

The review process and data cleansing typically require the use of a tool to
examine the data. The following section reviews the tools options for data
cleansing.

Note: In the case of Windchill CounterPart, it can also serve as a conversion tool.
Using a tool such as CounterPart provides a layer of abstraction and protects the
customer from changing load file formats if the PTC loaders change. For more
information on CounterPart, refer to Windchill CounterPart: Pros and Cons
below.

Data Cleansing: Overview of the Tools Available


A time consuming part of the data loading process is reviewing and cleansing the
data and ensuring that it meets the data format requirements specified by the
appropriate RBInfo files and DTDs.

Note: As of Windchill 7.0, data files must be in XML format and must comply
with the DTD supplied with the Windchill installation (available from the
standardX05 directory). Refer to Validating the XML Format later in this guide
for information on creating and validating XML data files.

The following sections provide the pros and cons of different tool options for
cleansing the data.

Text Editors: Pros and Cons


Text editors, such as WordPad, Notepad or TextPad are simple to use and readily
available. They might be used when additional data conversion is not necessary
and the size of the data file is small. They provide a quick view of what is about to
be loaded.

Pros
• Simple to use
• Usually available on most operating systems
• Provide a quick review of data
• Minimal learning curve
• Can be used for simple search and replace
• No additional "coding" or preparation is required to view data in this tool
• Works for XML, CSV, or other text files

Preparing Data for Loading 2-3


Cons
• Data validation not available
• Additional Data transformation is not available
• Provide a quick review of data
• Not really viable for large amounts of data

Microsoft Excel: Pros and Cons


Customers may have routines to produce data in "flat file" format separated by a
delimiter, perhaps a comma. Microsoft Excel is a good tool to use to view data in
neatly organized rows and columns.

Pros
• Simple to use
• Usually available on most Windows operating systems
• Provides a quick review of data
• Can be used for simple search and replace
• Can develop formulas to validate data
• Minimal learning curve
• Limited additional data transformation is available by manually moving
columns
• Data can be filtered and sorted. This provides an easy approach to identifying
duplicate parts and documents as well as producing a list of items to add to
Resource bundles.

Cons
• Data must be parsed into columns manually (Data - Text To Columns)
• Limited to 65,536 rows of data per worksheet
• Not available when working on non-Windows platforms
• Requires that data be in row and column format. Data consistency.

2-4 Windchill Data Loading Reference and Best Practices Guide


Custom Code: Pros and Cons
Custom developed code can greatly enhance the load process. Developing XML
transforms and or Java programs allows the customer to continually deliver data
in the same format regardless of the desired load file format. With the introduction
of containers in Windchill 7.0, custom-built code can be used to separate data into
groups of load files as is now required.
Custom Code is most likely to be used in conjunction with another tool, such as a
text editor.
This approach is most likely used when the load file format is different than the
format the data is provided in.

Pros
• Can be developed with special rules for data validation
• Transforms data from neutral (customer supplied) to load ready format.
• Allows for data segregation
• Unlike manual manipulation involved with the use of a tool such as Excel
where there is the potential for error; the development of custom code has
consistent and explainable outcomes.
• Are transportable and shareable
• Will run on multiple operating systems

Cons
• Tightly coupled to input and output. A change in the input or output will
require a change to the custom code.
• No User Interface to review the data
• Usually requires the use of an additional tool for reviewing data
• Multiple skill sets are required
• After code is developed, the process remains a combination of manual and
programmatic efforts

Preparing Data for Loading 2-5


Windchill CounterPart: Pros and Cons
Owners of Windchill PDMLink or another Windchill family product can utilize
CounterPart to prepare product data for loading into these Windchill solutions.
CounterPart is well suited to working with product data such as:
• Part and product attributes
• Documents and associated content
• Product Structures and Bills of Materials
• Lists of approved Manufacturers, Vendors, and Parts
As of Windchill 7.0, PTC recommends that you use CounterPart as a staging area
for data cleansing only. You should then save the data in CSV format and use the
CSV2XML conversion utility to generate your XML. For more information on
the CSV2XML utility, refer to Using the CSV2XML Utility and Validating the
XML Format later in this guide.

Pros
• Can be developed with special rules for data validation
• Transforms data from neutral (customer supplied) to load ready format
• Can add rules for data validation
• Ideal for large data amounts
• Presents data in a user interface much like Microsoft Excel
• Formulas and filters can be applied on the fly
• Unlike manual manipulation involved with the use of a tool such as Microsoft
Excel where there is the potential for error; the development of custom code
has consistent and explainable outcomes.
• Transportable and shareable
• Will run on multiple operating systems
• Provides a single source for reviewing and classify (segregating) data
• All load ready data files can be produced at the same time

Cons
• Requires development of customer import and export transforms
• Steep learning curve
• Limited support
• Multiple skill sets are required

2-6 Windchill Data Loading Reference and Best Practices Guide


Using CounterPart to Load Windchill Classifications
If you are working with a Windchill classification, you can use CounterPart to
make bulk changes to the classification. Using the Windchill Classification
Administrator (in the Tools menu), you can check out, update, and then check in a
Windchill classification on a live system. Refer to the CounterPart online help for
more information on using the Windchill Classification Administrator.
The Windchill Standard Classification (WSC) is also available with CounterPart.
The WSC is a compilation of classification nodes, attributes, and standard images
that are ready to be used in CounterPart. You can use it as a starting point for the
creation of your company-specific Windchill classification. The WSC provides a
pre-assembled hierarchy including products from Mechanical, Electrical/Elec-
tronic, and Information Technology domains.

Working with a Sample Data Set


Once you have identified the legacy systems and subject matter experts with
whom you will be working, it is important to extract a sample data set for review.
For example, a data file of parts can be examined to produce a unique list of Part
Types. This list should then be compared against the PartTypeRB.rbInfo file.
Similarly, a unique list of part quantities can be compared to the
QuantityUnitRB.rbInfo file.
The rbInfo files that ship with Windchill are located in the <Windchill>\src\wt\
directory structure. These files contain out-of-the-box default values for various
drop-down selection boxes and are useful in determining if additional values must
be added.
A sample data set should be a single file that is representative of the entire data.
You must identify the data types (for example, parts, documents, etc.) that will be
included in the data set, as well as the size of the data set. In the case of multiple
legacy systems, you should also determine whether the data on the systems will
load independently or if they need to be combined, cleansed, and loaded together.
How the sample data set is extracted from the legacy system is dependent on the
legacy system. It is preferable that the data set be in CSV format since CSV is
easily converted to XML that can be validated against the Windchill
standardX05.dtd.
The following section describes the type of information that should be provided to
the customer to communicate the format and delivery of the extracted data set.

Preparing Data for Loading 2-7


Creating Data Extraction and Format Requirements
Data extraction and format requirements should be clearly communicated to the
person doing the extraction. If once the data is extracted and validation shows
errors or anomalies in the data, return to the process of developing these
requirements to eliminate the anomalies.
The following is a list of possible issues for data extraction and data formatting.
They should be resolved in a requirements document for data extraction.
• Is there the possibility of confusion around terminology among the systems?
Specify terminology in a table that maps the terms among the systems.
• Specify that data should be provided in text-based files readable by common
programs such as Notepad, TextPad, WordPad, etc.
• Specify how files should be named (for example, customer_xxxx_yyyy.txt,
where xxxx is the file type (part, BOM, document, etc.).
• Specify how data should be segregated (for example, by object type).
• If the data files will contain additional attributes that will need to be
calculated or derived, these attributes should be identified.
• Specify how you want attributes (or fields) to be separated (for example, by a
“~” (tilde)).

Developing Load Metrics


Once the sample data set has been successfully loaded, it is possible to calculate
how long it took to load the data file. This allows you to calculate the total
parts/minute for loading. You can extrapolate from these metrics the amount of
time required to load all of the data. This may or may not affect scheduling of the
load activities.

2-8 Windchill Data Loading Reference and Best Practices Guide


3
Using the CSV2XML Utility and
Validating the XML Format

This chapter describes the CSV2XML utility required to convert CSV data files to
XML format files, as well as a suggested process for validating the XML files.

Note: Starting with Windchill 7.0, the data loader classes do not support CSV-
formatted data files.

Section Page
About the CSV2XML Utility ..............................................................................3-2
Converting CSV Files for Multibyte Operating Systems....................................3-2
Converting CSV Files to XML Format Files ......................................................3-2
Working with Larger Files ..................................................................................3-3
CSV2XML Arguments........................................................................................3-3
Validating the XML Format................................................................................3-5

Using the CSV2XML Utility and Validating the XML Format 3-1
About the CSV2XML Utility
The CSV2XML is a command line utility that converts CSV formatted object files
to XML. Windchill 6.2.6 load files must be converted into XML format. The
CSV2XML utility only works with files ending in "CSV" and only with files that
have a comma ( , ) as a field separation token.
For files that use a different separator (for example, ~), open the file in a text
editor. Search and replace all commas ( , ) with a special string of characters, (for
example, @#@#@). Without any commas left, replace the existing token with
commas. Save the file and run the CSV2XML conversion utility. Open the new
XML file and search and replace @#@#@ with commas.

Note: The CSV2XML utility does not generate XML for use by the LoadFileSet
utility.

Converting CSV Files for Multibyte Operating Systems


Windchill supports international character sets and must share data across
different environments. The Windchill load utilities require that the XML data
files be encoded in UTF-8.
Since Windchill 7.0 M010, the CSV2XML utility can work with CSV files
written in different encoding. The encoding of the source CSV file should be
specified in the command line as follows:
windchill wt.load.util.CSV2XML -input <input csv file> -encoding
<encoding of the input csv file>.

If the -encoding argument is not specified, the CSV2XML utility will use the
operating system’s default encoding. The output XML file will be always in
UTF-8.

Converting CSV Files to XML Format Files


Note: Before converting the CSV files, it may be necessary to update the CSV
file to match the definitions in the csvmapfile.txt file. The files must contain all of
the data required (i.e., containers) before they are converted with the CSV2XML
utility.

PTC recommends that you create your test data using the CSV file format and
then use the conversion utility to convert it to XML as it is easier to create the data
and less error prone in the CSV format.
The syntax for the CSV2XML utility is as follows:
windchill wt.load.util.CSV2XML -input[input file or directory]
-output[output directory] -root[specifies the root directory]
-help -encoding [encoding of the source CSV file]

Refer to CSV2XML Arguments below for more information.

3-2 Windchill Data Loading Reference and Best Practices Guide


The data load utilities will expect to find the data files in the
<LoadFromFile>/src/loadFiles directory. If you use all the defaults, then the
command would look like:
windchill wt.load.util.CSV2XML

To convert a CSV file to an XML file


1. Verify the CSV file matches the file description defined in the
<Windchill>/loadFiles/csvmapfile.txt file. Make changes accordingly.
2. Run CSV2XML utility to generate object XML files.
3. Validate the XML files against <Windchill>/loadXMLFiles\standardX05.dtd.
This step is recommended to identify invalid file formats to avoid causing the
file load process to fail.

Note: The Life Cycle Administrator requires that all Life Cycle objects be
stored in the System cabinets. Do not change the System cabinet designation
in the Life Cycle XML load files. Also, the data content in the XML files is
case-sensitive.

Working with Larger Files


For large input files, it may be necessary to increase the memory allocated. For
example, if the general command to the run the utility is:
windchill wt.load.util.CSV2XML -input <file_name>.csv

Then, for large input files it may be necessary to allocate 512 MB of memory:
java -Xmx512m wt.load.util.CSV2XML -input <file_name>.csv

CSV2XML Arguments
The following table describes the arguments available to the CSV2XML utility.

Argument Description

input [input file name or directory Specifies the file name of the CSV file
name] or the directory where the CSV files
are located.
Its path is relative to root. If a directory
is specified, then all the files in the
directory are converted. If a file is
specified, then only the file is
converted.
This argument is optional.

Using the CSV2XML Utility and Validating the XML Format 3-3
Argument Description

output [output directory] Specifies the directory where to place


the output XML files.
When specified, this must be a
directory; otherwise an error will
occur if a file is specified. The
directory must exist.
If the directory already contains an
output file, the CSV file conversion
will not occur and a diagnostic
message is printed. A new file is
created and the old file is renamed and
backed up. The renaming is done by
appending the date and time of the
creation of the new file.
By default, this is the same as the root
directory. This argument is optional.

root [directory] Specifies the root directory.


By default, the root directory is
<Windchill>/src/loadFiles.

help (or h) Prints information about CSV2XML.


This argument is optional.

encoding Encoding of the source csv file.


This argument is optional. If not
specified, will use system default
encoding

3-4 Windchill Data Loading Reference and Best Practices Guide


Validating the XML Format
Once the data file is extracted from the legacy system and converted to XML, it is
important to validate the data file prior to attempting to load it to the Windchill
system. Version 2004 of XMLSPY has been used to assist in the data loading
process. It has been useful in validating data against the standardX05.dtd file.
For validation, the csvmap.dtd file is located in:
<Windchill>\codebase\registry\ixb\dtds\standardX05.dtd
Ensure that the following line is in your XML data files:
<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

Selecting the Appropriate DTD at Runtime


Four DTD files are available for use during runtime of the LoadFromFile and
LoadFileSet utilities. The following files are located in the <Windchill>\codebase\
registry\ixb\dtds\standardX05.dtd directory:
• csvmapfile.dtd — DTD describing data converted from CSV format, as well
as some basic definitions such as those for containers
• netmarkets.dtd — Provides ProjectLink definitions
• PDMLink.dtd — Provides Windchill PDMLink definitions
• coreobjects.dtd — DTD for Import/Export
These DTD are appended together at runtime and form a single DTD file. To
specify the DTD in an XML data file, add the following line:
<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

Note: Internally, the load framework locates the directory <Windchill>\codebase\


registry\ixb\dtds\standardX05.dtd and creates a combined DTD from all DTD
files in the folder. Ensure that this folder does not contain backup files. All
backups should be done to a separate location.

To obtain the validation DTD which is in sync with the runtime DTD, run the
following command:
windchill wt.load.util.UpdateEditDTDUtility

Using the CSV2XML Utility and Validating the XML Format 3-5
Using XML Spy to Validate the Data Files
XMLSPY allows for the orderly display and entry of XML data. Data can be
displayed in standard text form, grid entry, or in browser mode. The following
figure displays a user load file in table format (grid mode). Data can be entered
directly in the grid mode.

To validate the proper format of a XML load file


1. Open the XML file in XMLSPY and assign the DTD using the Assign DTD
option as shown below:

2. Click Browse in the dialog box that appears to locate and select the proper
DTD.
3. Click OK to assign the DTD.

A warning appears stating that there is an external DTD already assigned.


4. Click OK to continue.
5. Click Validate to validate the XML.

3-6 Windchill Data Loading Reference and Best Practices Guide


4
Loading Legacy Data Using the
LoadFromFile and LoadFileSet
Utilities

This chapter describes the LoadFromFile and LoadFileSet utilities, the available
arguments, and the load file sets that accompany your Windchill installation. It
also reviews the process required to successfully load legacy data, beginning with
a review of the container hierarchy.

Section Page
Overview: Data Loading Utilities .......................................................................4-2
Using the LoadFromFile Utility ..........................................................................4-2
Using the LoadFileSet Utility..............................................................................4-5
About the Load Files ...........................................................................................4-6
Loading Legacy Data ..........................................................................................4-8
Working with Containers ....................................................................................4-9

Loading Legacy Data Using the LoadFromFile and LoadFileSet Utilities 4-1
Overview: Data Loading Utilities
In addition to the demonstration data that PTC provides, you may also have
legacy data that you would to add to the Windchill database. PTC provides two
utilities to load legacy data; LoadFromFile and LoadFileSet.
LoadFromFile is a command line utility that is used to load a single, customized
data file into the Windchill database. LoadFileSet is a command line utility that is
used to load multiple, customized data files into the Windchill database. In both
cases, the data files must reside on the Windchill server.
For information on which object types require the use of the Import/Export
framework, refer to When Do I Use LoadFromFile and Import/Export? earlier in
this guide.

Note: The load utilities only process XML files.The CSV2XML utility is used to
convert CSV files to XML formatted files. If your data is CSV formatted, then
you can reformat it to XML using the CSV2XML utility before loading the data
into the database. Refer to Converting CSV Files to XML Format Files earlier in
this guide for more information.

Using the LoadFromFile Utility


The LoadFromFile utility is a user-authenticated process. User authentication can
be provided through the command line or through the pop-up window displayed
by the utility.
The LoadFromFile syntax is:
windchill wt.load.LoadFromFile -d [data file name]
-u [user name] -p [user password] -CONT_PATH [container path]

Note: On Windows operating systems, if a LoadFromFile argument includes


spaces, you must enclose the argument in double quotes (" ") and precede the
quotes (escaped) with a backslash (\). For example, where "part 4" includes spaces
in the CONT_PATH argument:

windchill wt.load.LoadFromFile
-d D:\Dev\LoadfileforTesting\Part.xml
-CONT_PATH \
"/wt.inf.container.OrgContainer=TST/wt.pdmlink.PDMLinkProduct=p
art 4\"

The following table lists the LoadFromFile arguments available.

4-2 Windchill Data Loading Reference and Best Practices Guide


LoadFromFile Arguments

Argument Description

d [data file name] Specifies the name of the object file


that contains the objects to be loaded
into the Windchill database.
It is recommended that you provide
the full path name of the data file. The
file must reside on the Windchill
server.
This argument is required.

u [user name] Specifies the name of the user to


authenticate the additions being made
to the database.
The user argument is optional for the
command line; however, the
LoadFromFile utility will prompt for
user authentication using a pop-up
window.
This argument is optional.

p [user password] Specifies the password for the


authenticating user.
The password argument is optional for
the command line, however, the
LoadFromFile utility will prompt for
user authentication using a pop-up
window.
This argument is optional.

CONT_PATH Specifies the target container for the


data when the target container is not
"Classic".
By default, the target container is
"Classic". "Classic" is an out-of-the-
box container with a WTLibrary
named Windchill PDM. It holds user
data such as parts, documents, etc., in
a Windchill PDM solution.
This argument is optional.

Loading Legacy Data Using the LoadFromFile and LoadFileSet Utilities 4-3
Sample Command Lines
LoadFromFile is executed from the command line to load legacy data into the
Windchill database.
If you specify only the required arguments, then the command would look like:
windchill wt.load.LoadFromFile -d [data file name]

If you specify all the arguments, then the command would look like:
windchill wt.load.LoadFromFile -d [data file name]
-u [user name] -p [user password]
-CONT_PATH [/wt.inf.container.OrgContainer=MyOrg/
wt.inf.library.WTLibrary=MyLibrary]

Note: In the sample command above, you can also load the container into the
organization without the library. The container path for OrgContainer would be:

-CONT_PATH /wt.inf.container.OrgContainer=MyOrg

More About CONT_PATH


CONT_PATH specifies the container path for the data when the target container
is not "Classic". The syntax to specify the container path may look like:
-CONT_PATH /wt.inf.container.OrgContainer=MyOrg

-CONT_PATH /wt.inf.container.OrgContainer=MyOrg/wt.pdmlink.
PDMLinkProduct=Prod

-CONT_PATH /wt.inf.container.OrgContainer=MyOrg/wt.pdmlink.
WTLibrary=Lib

Note: When loading into a container, there is an implied / hidden folder called
"Default" to load into a folder other than the default, the format
<folder>/Default/Widgets</folder> should be used.

4-4 Windchill Data Loading Reference and Best Practices Guide


Using the LoadFileSet Utility
The LoadFileSet utility can be used when multiple data files are loaded into the
database. The syntax for the LoadFileSet utility is as follows:
windchill wt.load.LoadFileSet -file [load file set path]
-descr [load set description] -UAOps|UNATTENDED -NOSERVERSTOP

The following table lists the LoadFileSet arguments available.


LoadFileSet Arguments

Argument Description

file [load file set path] Specifies the path name of the load file
set.
The file path should be relative to the
load directory; which is
<Windchill>/loadFiles by default.
This argument is required.

descr [load set description] Specifies a description of the load file


set. The description is displayed by the
installer along with the yes/no prompt.
For example:
Load <load file set path> <load set
description>?
This argument is optional.

UAOps or UNATTENDED Specifies whether the install should


run in unattended mode. You can
specify either argument.
The installer will not elicit prompts to
the typical questions it poses during
the installation.

NOSERVERSTOP (or NoServerStop) Specifies whether the method server


should be stopped and restarted after
the load process completes.
If this argument is not specified, then
the method server will be stopped and
restarted by the installer.
This argument is optional.

Loading Legacy Data Using the LoadFromFile and LoadFileSet Utilities 4-5
About the Load Files
There are two levels of XML files; the load file set and the object file. The load
file set specifies the set of object files and the container to load the data into. The
object file specifies the actual data of the objects to be loaded. The LoadFileSet
utility expects the load file set as input, and the LoadFromFile utility expects
object XML files as input.

Load File Set


A load file set specifies a set of object files and the container in which the objects
are loaded into. The DTD file, WindchillLoad.dtd, for the load file set is located in
the <Windchill>/codebase/wt/load/ directory. An example of the
WindchillLoad.dtd is as follows:
<!ELEMENT loadFileList (loadFile*) >

<!ATTLIST loadFileList containerPath CDATA #IMPLIED >

<!ELEMENT loadFile EMPTY >

<!ATTLIST loadFile filename CDATA #REQUIRED

rbinfo CDATA #IMPLIED

key CDATA #IMPLIED

title CDATA #IMPLIED

token CDATA #IMPLIED

mapfile CDATA #IMPLIED

containerPath CDATA #IMPLIED >

LoadFileList XML Element


This XML element contains the list of object XML files to load (specified
in loadFile elements). LoadFileList has an attribute of containerPath:
• ContainerPath — This parameter specifies the path of the container that the
object files are to be loaded into. It is highly recommended that this value be
set. By agreement, container path of Exchange (‘Site’) container is ‘/’. For
other containers it has the form of /container-class=container-name/…/…
For example:
/wt.inf.container.OrgContainer=DefaultOrg/
wt.inf.library.WTLibrary=Windchill PDM

/wt.inf.container.OrgContainer=
pjl-qa/wt.projmgmt.admin.Project2=Project14

4-6 Windchill Data Loading Reference and Best Practices Guide


LoadFile Element
This element specifies the object files that to load in the target container. It
is an empty tag with the following attributes:
• filename — This is the name of the object file to be loaded. Its location is
relative to the directory specified in wt.loadFiles property. Default is
$(wt.home)/loadFiles.

• rbinfo — Where resource information is stored for the particular file.


Used by the handlers.
• key — Localized title key.
• token — An exception will not be thrown if token is specified, but it
will be ignored.
• mapfile — An exception will not be thrown if mapfile is specified, but
it will be ignored.

containerPath
It is recommended that the set of objects to be loaded in a load set should
all reside in a single container. However, you can specify an alternative
containerPath that will cause the object in the current loadFile specification
to go into a different container than the other LoadFile pointers in the set.
This should only be specified under extraordinary circumstances.

Sample Load File Set


In the following load file set example, all the files are loaded into the
exchange container:
<!DOCTYPE loadFileList SYSTEM "/wt/load/windchillLoad.dtd">

<loadFileList containerPath=”/ ”>

<loadFile filename="mydataformats.xml" title="data formats"/>

<loadFile filename="myadmin.xml" title="miscellaneous admin


data and access rules"/>

<loadFile filename="myworkflow.xml" title="workflow base


data"/>

</loadFileList>

Object XML Files


An object file contains actual data for the objects that are loaded into the Windchill
database. The DTD file for them is <Windchill>/loadXMLFiles/standardX05.dtd. It
is strongly recommended that you validate an object XML file against this DTD
prior to loading the data because an invalid XML file will cause the load process to
fail.

Loading Legacy Data Using the LoadFromFile and LoadFileSet Utilities 4-7
Sample Object File
This is an example of what an object XML file may look like.
<?xml version="1.0" ?>

<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvPrefEntry handler="wt.prefs.LoadPrefEntry.createPrefEntry" >

<csvname>defaultLayout</csvname>

<csvvalue>System Default</csvvalue>

<csvnode>/worklist/layout</csvnode>

<csvuser></csvuser>

<csvcontext></csvcontext>

</csvPrefEntry>

</NmLoader>

Loading Legacy Data


As shown in the flowchart, The Data Loading Process, the process for loading
legacy data can be long and detailed. However, depending on your situation, the
order and number of steps required may change.
Prior to loading the legacy data, you should analyse the existing system, cleanse
the data, and provide extraction rules to the customer. Once a sample data set is
cleansed, extracted, and successfully loaded into Windchill, you can effectively
estimate how long it will take to load the entire data and which legacy systems (if
applicable) should be loaded and in which order.

Note: In some situations, it is necessary to compile the data from all legacy
systems into one database and then prepare the data for loading to Windchill. In
other cases, it is prudent to load the data from each legacy system independently.
Carefully reviewing sample data from the legacy systems prior to beginning the
load process is extremely important.

Once the sample data set has been loaded successfully, the process to load legacy
data generally includes the following steps:
1. Back up the live Windchill system.
2. Freeze the legacy systems.
3. Extract the final data to be loaded.

4-8 Windchill Data Loading Reference and Best Practices Guide


4. Convert the data CSV to XML format, if required.
5. Load the data using LoadFromFile or LoadFileSet.
Refer to the arguments tables in this chapter for more information.

Note: The following chapter provides detailed examples of how to load users,
organizations, products, and libraries using the utilities in Step 5.

Working with Containers


In Windchill 7.0, containers were introduced to improve the organization of and
provide separation inside a Windchill system. In the Windchill user interface,
containers appear to the user as "contexts".
There are three levels of containers: site, organization, and business object. After
installing Windchill, it is recommended that the system administrator load demo
data to ensure that the system is working. The Windchill Loader is used to load
this data. Refer to the Windchill Installation and Configuration Guide for more
information on the Windchill Loader.
By default, the Windchill Loader creates the following containers:
• site container
• organization container
• Windchill PDM container
These containers are nested and create a hierarchy (that is, the organization
container exists within the site container). The Windchill Loader only creates one
of each container.

Containers in PDM and Windchill PDMLink


If you have installed a solution (for example, Windchill PDMLink), then there are
minor differences in how the hierarchy must look. In order to load data into the
appropriate container, you must be aware of the differences in the hierarchy. Data
files must be prepared to load into the appropriate container. A separate file for
each container is required and the container must be specified in the
LoadFromFile command.

Note: Once all objects are loaded, you can load the structure separately using the
AssemblyAddLoad tag.

Loading Legacy Data Using the LoadFromFile and LoadFileSet Utilities 4-9
PDM Foundation Hierarchy
Site container
– Organization container
• WCPDM container
◆ Parts
◆ Documents
◆ CAD documents, etc.
In the PDM Foundation hierarchy, there is a single site container and a single
organization container. Within the organization container, there must be the
Windchill PDM container. Business-level objects such as parts, documents, and
CAD documents can be loaded in to the Windchill PDM container.

Windchill PDMLink Hierarchy


Site container
– Organization container(s)
• Product containers
• Library containers
◆ Documents
In the Windchill PDMLink hierarchy, there is a single site container and a single
organization container when the solution is installed. You may create additional
organization containers.
Within each organization container, there may be product and library containers.
Business-level objects such as parts, documents, and CAD documents can be
loaded into the product or library containers.
Multiple product containers can exist in one load file. product containers belong
to an organization, so when calling the load utility, the proper organization should
be specified.

4-10 Windchill Data Loading Reference and Best Practices Guide


5
Creating Load Methods

This chapter describes the procedure for editing the csvmapfile.txt file and for
creating custom load methods.

Section Page
Customizing Loading ..........................................................................................5-2
Modifying Data Files...........................................................................................5-3
Creating New Methods for Loading....................................................................5-5

5-1
Customizing Loading
You can customize loading by either changing the data in the data files provided
in the Windchill\loadFiles directory or by adding new methods to load locally
customized classes.
Changing the data in the files loads local data into existing classes. Refer to
Modifying Data Files below for more information.

About the csvmapfile.txt File


Starting in Windchill 7.0, the csvmapfile.txt file exists as an input to conversion
utilities such as DTDGenerator and CSV2XML. The DTDGenerator updates the
csvmapfile.dtd.
For more information on the CSV2XML utility, refer to the chapter, Using the
CSV2XML Utility and Validating the XML Format earlier in this guide.
The csvmapfile.txt file is used to map the specific method call and the data fields
to a line in the data file. The following is sample code from the map file:
#class,method,real method~attribute 1~attribute
2~&hellip;.~attribute n
General~create~wt.doc.LoadDoc.createGeneral~user~name~title
~number~type~description~department~saveIn~path~format
~project~domain~lifecycletemplate1

The first two fields, class and method, are the keys to the map file. Two keys are
given to each line in the map file to allow multiple definitions for a given actual
class in Windchill. This allows alternate names for one class, multiple functions
for one class, or different input fields.
Both class and method are arbitrary strings. The class value matches the class in
the data file. It is used only to match the map and data files so it can be any string
as long as the same string is used in both. The method value matches the method
variable passed either on the command line or as a parameter to doFileLoad.
The real method field is the fully qualified method name that load calls through
introspection with the values from the data file. The attributes 1 through n match
the text used in the real method. The order in the map file is used to retrieve the
values from the data file.
The following are possible scenarios for modifying the csvmapfile.txt file:
• Data in the data file has the data fields in a different order. Edit the
csvmapfile.txt to make the order the same as the data file. See Modifying Data
Files below.

1. The preceding is only one line but wrapped here for readability. Continuation of lines is not
accepted.

5-2 Windchill Data Loading Reference and Best Practices Guide


• You want to add a new site class. Create a new line in the map file with a new
class, real method, and new attribute list. See Creating New Methods for
Loading later in this chapter.
The line below an example of a line added to the csvmapfile.txt file for a new
class:
NewClass~create~wt.doc.LoadDoc.createNewClass~user~name~title
~number~type~description~department~my_new_attribute~saveIn
~path~format~project~domain~lifecycletemplate

Note: Do not put blank lines in the map file. One or more empty lines between
entries cause the load to fail.

Modifying Data Files


The data file is used to provide the load with data. This section outlines the steps
required to modify XML data files. There are two methods to choose from.

Method 1: Modifying XML Load Files Directly


Before you begin the following procedure, ensure that you have an installation of
XMLSpy or another XML editor that can validate the XML against a DTD.
1. Make your changes to the \Windchill\loadFiles\csvmapfile.txt file.
2. Run windchill wt.load.util.DTDGenerator to generate a new runtime DTD
(csvmapfile.dtd). The runtime DTD is located at <Windchill>\codebase\
registry\ixb\dtds\standardX05.dtd

Note: The csvmapfile.dtd file is a partial DTD and therefore cannot be used
for validation. To obtain DTD file for validation, run windchill
wt.load.util.UpdateEditDTDUtility. This will propagate your changes to the
<Windchill>\loadXMLFiles\standardX05.dtd file.

3. Using an XML editor, make changes to the XML data files and validate them
against the DTD obtained in Step 2.windchill

Creating Load Methods 5-3


Method 2: Modifying CSV Files and Propagating Changes to XML and DTD Files
With this approach, you work with the CSV (Comma Separate Value) files and
use automated tools to generate XML load files and the DTD file.

To propagate changes to XML and DTD


1. Make your changes to the CSV data file.
2. Make your changes to \Windchill\loadFiles\csvmapfile.txt.
3. Run the following utility to generate a csvmapfile.dtd file:
windchill wt.load.util.DTDGenerator

4. Run the following utility to update the /loadXMLFiles/standardX05.dtd file to


reflect your changes:
windchill wt.load.util.UpdateEditDTDUtility

5. Run the following utility to generate XML load files:


windchill wt.load.util.CSV2XML -input [optional] -output
[optional] -root [optional] -h [optional] –encoding [optional]

-h — Print out this message


-root — Specifies the root directory, by default this is $(wt.home)/loadFiles
-input — Specifies the input file or directory, its path is relative to root, (or its
default). If a directory is specified, all CSV files are processed. If -input is a
file, then only that file is processed
-output — Specifies the output directory, by default this is the same as the
root directory. A diagnostic error message is printed if the output parameter is
a file, an exception is thrown if it does not exist. If the output file already
exists, but is read only, the CSV file will not be transformed, and a diagnostic
message will be printed
-encoding — Specifies the character encoding of the source CST file. If not
specified, will use the default encoding for the system. Regardless of the
source encoding, the output XML file will always be in UTF-8.
6. Validate the XML file against the DTD and test your changes.

5-4 Windchill Data Loading Reference and Best Practices Guide


Creating New Methods for Loading
You may need to create a new method or class for a loader. This is done by editing
the method and then adding the appropriate reference to the csvmapfile.txt file.
When the DTD is generated as described earlier in this chapter, the new method is
reflected in the DTD, allowing the load to proceed.

Note: The source code for the LoadDoc and LoadPart loaders is available for
customization. You can create new methods for loading by editing this source
code. Refer to the appropriate section below.

About Load Methods


All the methods that are called by the load framework follow the same signature:
boolean createNewClass(Hashtable nv, Hashtable cmd_line,
Vector return_objects )
The method should return true if the function is successful, and false if it is not.
The parameters are as follows:
• The nv parameter is a hash table of the attribute names from the map file as
the keys and the corresponding strings from one line of the data file as the
value.
• The cmd_line parameter is a hash table of the extra attributes from the
command line (parameters not defined in the interface). This allows
substitution of values from the command line into the data file at runtime.
• The return_objects parameter is a vector of the objects created or worked
upon by the createNewClass method. After the object is manipulated, add it to
the vector; for example:
return_objects.addElement(doc);

This vector is used to give more informative messages back to the command
line. If the object that was manipulated by this method does not implement
getIdentity or that information would not be useful in a message to the
command line, a string should be added to the return_object instead; for
example:
String msg = "Type = Content Item, Identity =
" + appData.getFileName();
return_objects.addElement(msg);

Creating Load Methods 5-5


Resolving Data
There is a utility that resolves the data from the data file and the data from the
command line. For example, to retrieve a value for the new attribute that was
added for NewClass, use the following:
String my_attribute = LoadServerHelper.getValue("my_new_attribute",
nv,cmd_line,LoadServerHelper.REQUIRED);

The first parameter is the string from the map file. The last parameter is used to
indicate if the field is required, not required, or blank okay.
If the field is required or the load should fail, use LoadServerHelper.REQUIRED
and check if the return value is null. LoadServerHelper.getValue generates an
error message if the value is required and the field value is null or an empty string.
If the field is not required and you want the return set to null for no value or empty
strings, use LoadServerHelper.NOT_REQUIRED.
If you want to know the difference between no value being given for a field and an
empty string, use LoadServerHelper.BLANK_OKAY. The blank okay option
returns null if the attribute is not found in the hash table, meaning there could be a
format issue with the map and data files. The blank okay option returns "" if the
attribute is found in the hash table but the value was blank, which, depending on
the attribute, could be okay.

Additional Utilities within a Method


The following are utilities or helper methods for use within a method:
• The LoadServerHelper.getTargetContainer() method can be used to get a
target container for a load. This is the container specified in the load file set,
or, if using LoadFromFile, it is specified using the -CONT_PATH command
line option.
If no container was specified, it will display a warning message and try to use
Windchill PDM ('Classic') container. If there is no Classic container, Site
('Exchange') will be used.
• The LoadServerHelper.getTargetDomain() method can be used to get a target
domain for a load. The input file may specify the domain path as follows:
– Full path ('/System') -- In this case, it will look in the target container and
then in Exchange.
– Container qualified path ('[/]/System') -- If the container is a parent
organization for the target container, you may use [/Org] for container
path part.
– For migration purposes, it also supports domain name ('System'). If
domain name is a special domain, it will return this domain. Otherwise, it
will return the domain with the root parent in the Classic container.

5-6 Windchill Data Loading Reference and Best Practices Guide


• The LoadServerHelper.changePrincipal(user) method can be used to change
the effective user for a set of actions. This can be used only if the user who
was authenticated for this session is a member of the administrative group.
Upon completion of processing one line of data, the load utility sets the
principal back to the original one, if the method it called changed the
principal.
• The LoadServerHelper.removeCacheValue(MY_KEY) method and
LoadServerHelper.setCacheValue(MY_KEY,my_object) method can be used
to cache objects between calls to a specific method or calls to different
methods. The load utility calls one method per line in the data file. Loading
documents and then loading multiple content files into a document is one
example of first creating a document, caching it, and returning to the load.
The load then reads in the next data line, which is a content line.
• The LoadContent method retrieves the cached data as follows:
ContentHolder contentHolder =

(ContentHolder)LoadServerHelper.getCacheValue(CURRENT_CH_KEY);

This method adds the content file to the document. If you are creating an
object that can hold content (files and URLs) and you want to load multiple
content items on lines following the object in the data file, you must cache the
object using the following constant:
private static String CURRENT_CH_KEY = "Current ContentHolder";

If you want to cache an object for another reason, you must create a unique
key string. It is recommended that you clear your cached object at the
beginning of the next create so that if the create fails, the next operation
depending on it will fail and not corrupt other data. The cache of all objects is
cleared after the last data line is processed.

Note: The cache does not do garbage collection by itself. If you cache lots of
items with different keys and run the method multiple times through a load
file, this will limit the size of your load file because you can run out of
memory.

The load utility creates a transaction block around the processing of each line
of data. If the method returns false, the transaction block is rolled back. If it
returns true, it is committed. The cache is not cleared if the method returns
false.

Creating a Document Class


PTC supports two types of customization of the document class; a modeled/hard
type and a soft type.
If you add a soft type or soft attributes to WTDocument, then the existing load
methods do not require any customization. However, if you add a modeled or hard
type customization to WTDocument, then a new load method is required.

Creating Load Methods 5-7


To customize wt.doc.LoadDoc to work with new modeled subclasses of
WTDocument, search LoadDoc for the factory method that creates the new
instance of the Document.
The statement is as follows:
document = WTDocument.newWTDocument in the constructDocument method
Change the above statement to handle the new modeled class. Second, you should
search for the applyHardAttributes method and add the setting of any modeled
attributes.

Note: wt.doc.LoadDoc can handle loading out of sequence iterations and


versions. Refer to the JavaDoc for information on the beginCreateWTDocument
class.

Creating a Part Class


PTC supports two types of customization of the part class: a modeled/hard type
and a soft type.
If you add a soft type or soft attributes to WTPart, then the existing load methods
do not require any customization. However, if you add a modeled or hard type
customization to WTPart, then a new load method is required.
To customize wt.part.LoadPart to work with new modeled subclasses of WTPart,
search LoadPart for the factory method that creates the new instance of the part.
The statement is as follows:
part = WTPart.newWTPart in the constructPart method
Change the above statement to handle the new modeled class. Second, you should
search for the applyHardAttributes method and add the setting of any modeled
attributes.

Note: wt.part.LoadPart can handle loading out of sequence iterations and


versions. Refer to the JavaDoc for information on the beginCreateWTPart class.

5-8 Windchill Data Loading Reference and Best Practices Guide


6
Loading Product
Objects and Parts:
Windchill PDMLink Example

This chapter provides a detailed example of the data loading process for users,
product objects, and parts. It begins by creating organizations, product containers,
and library containers in a Windchill PDMLink system.

Section Page
Before You Begin................................................................................................6-2
Loading Users......................................................................................................6-5
Creating Organizations........................................................................................6-5
Creating Product Containers ...............................................................................6-6
Creating Library Containers..............................................................................6-12
Loading Product Objects and Parts ...................................................................6-17
Loading Relationships Between Parts and Documents .....................................6-26

Loading Product Objects and Parts: Windchill PDMLink Example 6-1


Before You Begin
The examples in this chapter assume that the legacy data is being delivered in a
Comma Separated Value format. The legacy data has been extracted and
formatted as required by the loaders. XML and Java may have been used to
transform the data from the extracted format into the proper format to load into
Windchill (XML). Refer to the chapter, Using the CSV2XML Utility and
Validating the XML Format, for more information.

Note: In Windchill 7.0, containers were introduced to improve the organization


of Windchill system. In the Windchill user interface, containers appear to the user
as "contexts". There are three levels of containers: site, organization, and business
object. Refer to Working with Containers in the previous chapter for a more
detailed description of containers and how they must be organized for Windchill
PDMLink systems.

Running the LoadFromFile Utility


The LoadFromFile utility is called from a batch file. Within the batch file, a
variable is established to identify the organization. This variable is then used
throughout the load process.
The load program is: wt.load.LoadFromFile. It has the following arguments:
-d data filename
-u user name
-p user password
-<var name> <var value>
To specify a target container, you may also use:
-CONT_PATH <target_container_path>

Note: If this is not specified, the target container path is assumed to be "Classic".
"Classic" is an out-of-the-box container with a WTLibrary named Windchill
PDM. It holds user data such as parts, documents, etc., in a Windchill PDM
solution.

The load utility is prefixed by "windchill". An example command would be:


windchill wt.load.LoadFromFile -d mydata.xml

Tip: Run the utility from the same directory where the data file resides.

6-2 Windchill Data Loading Reference and Best Practices Guide


Loading Windchill PDMLink Products
In Windchill PDMLink, there are essentially two classifications of a product —
Windchill PDMLink Product and WTProduct. Essentially the Windchill
PDMLink Product is the container under the organization container. This is what
is visible when viewing the Product tab in Windchill PDMLink. Essentially, what
you need to do is create a Windchill PDMLink product container and place the
actual WTProduct within this container.
In the following example, the XML code creates a product called LoadTest1. This
product will be visible when viewing the Organization tab. Assuming you have
an organization called MyOrg, then you will complete following steps

1. Load the Windchill PDMLink Product Container called LoadTest1


a. Create an XML file similar to the following:
<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvProductContainer
handler="wt.part.LoadPart.createProductContainer" >

<csvuser></csvuser>

<csvname>TestLoad1</csvname>

<csvnumber>TestLoad1</csvnumber>

<csvdescription>Test</csvdescription>

<csvview></csvview>

<csvsource></csvsource>

<csvdefaultUnit></csvdefaultUnit>

<csvtype></csvtype>

<csvcontainerTemplate>General
Product</csvcontainerTemplate>

</csvProductContainer>

</NmLoader>

b. Use the following command to load this XML file into the organization
called MyOrg:

Note: You must run this command as a user who belongs to the Site
Administrator group.

D:\8.0\Windchill>windchill wt.load.LoadFromFile -d d:\8.0\


Windchill\loadFiles\ProductContainerLoad.xml -CONT_PATH \
"/wt.inf.container.OrgContainer=MyOrg\"

Loading Product Objects and Parts: Windchill PDMLink Example 6-3


Loading the Actual WTProduct

a. Create an XML file to load the WTProduct that looks similar to the following:

Note: This example will also load a soft attribute called Results.

<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvProduct handler="wt.part.LoadPart.createProduct" >

<csvuser></csvuser>

<csvpartName>TestLoad1</csvpartName>

<csvpartNumber>TestLoad1</csvpartNumber>

<csvtype>separable</csvtype>

<csvsource>make</csvsource>

<csvfolder>/Default</csvfolder>

<csvlifecycle>Default</csvlifecycle>

<csvview></csvview>

<csvteamTemplate></csvteamTemplate>

<csvlifecyclestate></csvlifecyclestate>

<csvtypedef></csvtypedef>

<csvversion></csvversion>

<csviteration></csviteration>

<csvparentContainerPath></csvparentContainerPath>

</csvProduct>

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>Results</csvdefinition>

<csvvalue1>MyResults</csvvalue1>

<csvvalue2></csvvalue2>

<csvdependency_id></csvdependency_id>

</csvIBAValue>

6-4 Windchill Data Loading Reference and Best Practices Guide


<csvEndWTPart handler="wt.part.LoadPart.endCreateWTPart" >

<csvpublishFlag></csvpublishFlag>

<csvparentContainerPath></csvparentContainerPath>

</csvEndWTPart></NmLoader>

b. Load this file into the product container we created called TestLoad1:

Note: You must run this command as a user who belongs to the Site
Administrator group.

D:\8.0\Windchill>windchill wt.load.LoadFromFile -d d:\8.0\


Windchill\loadFiles\TestProductLoad.xml -CONT_PATH \
"/wt.inf.container.OrgContainer=MyOrg/wt.pdmlink.PDMLinkProduct
=TestLoad1\"

The product called TestLoad1 should now be visible in the Product tab.

Loading Users
Once converted from the legacy data format, the data file can be processed as is
without additional modification.

Tip: Prior to processing the load file, validate that all users belong to the proper
organization and have an e-mail address. This is done by examining the load file
prior to processing.

In most circumstances, the <csvOrganization>My


Organization</csvOrganization> entry of the load file should match the
organization into which you want to load data.

Tip: It is important that users have an e-mail address. Without an e-mail address
entry, users will not show up in the Find Users dialog box.

Loading Users: Sample Command


To process the load file, it is not necessary to specify a container.
windchill wt.load.LoadFromFile -d users.xml -u wcadmin -p wcadmin

Creating Organizations
The concept of organization is new to Windchill PDMLink so no CSV2XML
conversion is required.

Creating Organizations: Sample Command


windchill wt.load.LoadFromFile -d organization.xml -u wcadmin -p
wcadmin

Loading Product Objects and Parts: Windchill PDMLink Example 6-5


Creating Product Containers
No legacy "Product Container" load tag existed in Windchill 6.2.6. A product was
created using several steps. In Windchill 8.0, a "Product Container" can be created
in one step. In this example, the customer had already prepared a load file for
products based upon a Windchill 6.2.6 load process.
For general administrative information on containers, refer to the chapter,
Administering Containers, in the Windchill Business Administrator’s Guide.

Step 1
To use the proper data from the customer the data file was converted to XML
using the CSV2XML utility. The XML file should resemble the following:
<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvProduct handler="wt.part.LoadPart.createProduct" >

<csvuser></csvuser>

<csvpartName>FINAL ASSEMBLY</csvpartName>

<csvpartNumber>Prod_001</csvpartNumber>

<csvtype>fg</csvtype>

<csvsource>make</csvsource>

<csvfolder>/Prod_001</csvfolder>

<csvlifecycle>Default No Routing</csvlifecycle>

<csvview></csvview>

<csvteamTemplate>System.Default</csvteamTemplate>

<csvlifecyclestate>RELEASED</csvlifecyclestate>

<csvtypedef></csvtypedef>

<csvversion>-</csvversion>

<csviteration>1</csviteration>

<csvparentContainerPath></csvparentContainerPath>

</csvProduct>

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>AttribContr/Productline</csvdefinition>

<csvvalue1>Military</csvvalue1>

<csvvalue2></csvvalue2>

6-6 Windchill Data Loading Reference and Best Practices Guide


<csvdependency_id></csvdependency_id>

</csvIBAValue>

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>AttribContr/Program</csvdefinition>

<csvvalue1>No Program</csvvalue1>

<csvvalue2></csvvalue2>

<csvdependency_id></csvdependency_id>

</csvIBAValue>

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>AttribContr/spectype</csvdefinition>

<csvvalue1>No Type</csvvalue1>

<csvvalue2></csvvalue2>

<csvdependency_id></csvdependency_id>

</csvIBAValue>

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>AttribContr/Legacyrevision</csvdefinition>

<csvvalue1>*</csvvalue1>

<csvvalue2></csvvalue2>

<csvdependency_id></csvdependency_id>

</csvIBAValue>

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>AttribContr/Legacyrevdate</csvdefinition>

<csvvalue1>04-OCT-02</csvvalue1>

<csvvalue2></csvvalue2>

<csvdependency_id></csvdependency_id>

</csvIBAValue>

Loading Product Objects and Parts: Windchill PDMLink Example 6-7


<csvendIBAHolder
handler="wt.iba.value.service.LoadValue.endIBAHolder" />

</NmLoader>

Step 2
After the data was updated, it was processed using a custom built XSL stylesheet.
<?xml version="1.0" encoding="iso-8859-1"?>

<xsl:stylesheet

version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output

method="xml"

indent="yes"

encoding="iso-8859-1"

doctype-system="standardX05.dtd"

/>

<xsl:template match="/">

<NmLoader>

<xsl:for-each select="//csvProduct">

<csvProductContainer
handler="wt.part.LoadPart.createProductContainer" >

<csvname><xsl:value-of select="csvpartNumber"/>
</csvname>

<csvnumber><xsl:value-of select="csvpartNumber"/>
</csvnumber>

<csvdescription><xsl:value-of select="csvpartName"/>
</csvdescription>

<csvview></csvview>

<csvsource></csvsource>

<csvdefaultUnit></csvdefaultUnit>

<csvtype></csvtype>

<csvcontainerTemplate>General
Product</csvcontainerTemplate>

</csvProductContainer>

</xsl:for-each>

</NmLoader>

6-8 Windchill Data Loading Reference and Best Practices Guide


</xsl:template>

</xsl:stylesheet>

Tip: Although not illustrated in this example, XML code may be developed to
test data and validate it. For example, if a value is empty but is really required, a
default value could be substituted.

Step 3
After using the XML code above, a load-ready file is produced. Product
containers belong to an organization, so when calling the load utility, the proper
organization should be specified.
When running the load utility for product containers, a user must be specified. It is
a requirement that this user be a Product Creator for the specified organization. In
addition, they should belong to the Administrator group. This is usually done
manually.
Multiple product containers can exist in one load file.

Tip: The provided "GOLF Cart" demo (<Windchill>\loadFiles\pdmlink\


demodata) shows product containers being created with the <ProductContainer>
tag. It has been recommended that the following tag be used instead:
<csvProductContainer handler="wt.part.LoadPart.createProductContainer">

Example - Command Line


windchill wt.load.LoadFromFile -d product_container.xml -u wcoracle
-p wcoracle -CONT_PATH \"/wt.inf.container.OrgContainer=My
Organization"

Tip: When calling wt.load.LoadFromFile in UNIX and the container has a space
in the name, place quotes around the container. In addition be sure to escape the
quotes with a backslash.

Tip: To specify alternate Default values, adjust the product (End Item)
Initialization Rules from the Site Tab within Windchill PDMLink.

Example - Batch File


echo *************************************************

echo ** Variable Setup

echo *************************************************

set tmp_org="/wt.inf.container.OrgContainer=My Organization"

echo *************************************************

echo ** Legacy Products Containers

echo *************************************************

Loading Product Objects and Parts: Windchill PDMLink Example 6-9


windchill wt.load.LoadFromFile -d product_container.xml -u wcoracle
-p wcoracle -CONT_PATH \%tmp_org%

Creating Assemblies
Creating assemblies is necessary for creating Products that use parts which may
be common to other products, or may exist independently in other libraries.
The first thing that should be noted is that the <csvAssemblyAddLoad> tag can be
used ONLY with existing parts. In other words, it can only be used to create new
assemblies using existing parts. The <csvAssemblyAddLoad> CANNOT be used
to create a brand new part.
For that purpose, <csvProduct handler="wt.part.LoadPart.beginCreateWTPart" >
must first be used to create the part and then add constituent parts. In this example,
we look at two approaches.

Adding Pre-Existing Parts to a Another Part that Exists in a Product


This example assumes the following:
• Part-1 exists in the product, MyProduct-1. This part may have been loaded
previously, or added through the user interface.
• ExistingPart-1 and ExistingPart-2 reside in some other product or library.
• MyProduct-1 exists in the organization, MyOrg.
• The XML data resides in the file, DataFile.xml.
Given the above assumptions, the load can be performed using the following
command:
windchill wt.load.LoadFromFile -d DataFile.xml -u wcadmin -p
wcadmin -CONT_PATH
/wt.inf.container.OrgContainer=MyOrg/wt.pdmlink.PDMLinkProduct=MyP
roduct-1

The following is an example data file:


<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvAssemblyAddLoad
handler="wt.part.LoadPart.addPartToAssemblyLoad" >

<csvassemblyPartNumber>Part-1</csvassemblyPartNumber>

<csvconstituentPartNumber>ExistingPart-
1</csvconstituentPartNumber>

<csvconstituentPartQty>1</csvconstituentPartQty>

<csvconstituentPartUnit>ea</csvconstituentPartUnit>

6-10 Windchill Data Loading Reference and Best Practices Guide


</csvAssemblyAddLoad>

<NmLoader>

<csvAssemblyAddLoad
handler="wt.part.LoadPart.addPartToAssemblyLoad" >

<csvassemblyPartNumber>Part-1</csvassemblyPartNumber>

<csvconstituentPartNumber>ExistingPart-
2</csvconstituentPartNumber>

<csvconstituentPartQty>2</csvconstituentPartQty>

<csvconstituentPartUnit>ea</csvconstituentPartUnit>

</csvAssemblyAddLoad>

</NmLoader>

Creating a New Part Called LoadedAssm-1 and Adding Existing Parts as Constituent
Parts
This example assumes the following:
• ExistingPart-1 resides in some other product or library.
• MyProduct-1 exists in the organization, MyOrg.
• The XML data resides in the file, DataFile.xml.
Given the above assumptions, the load can be performed using the following
command:
windchill wt.load.LoadFromFile -d DataFile.xml -u wcadmin -p
wcadmin -CONT_PATH
/wt.inf.container.OrgContainer=MyOrg/wt.pdmlink.PDMLinkProduct=MyP
roduct-1

The following is an example data file:


<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvProduct handler="wt.part.LoadPart.beginCreateWTPart" >

<csvuser></csvuser>

<csvpartName>LoadedAssm-1</csvpartName>

<csvpartNumber>LoadedAssm-1</csvpartNumber>

<csvtype>separable</csvtype>

<csvsource>make</csvsource>

<csvfolder>/Default</csvfolder>

Loading Product Objects and Parts: Windchill PDMLink Example 6-11


<csvlifecycle>Default</csvlifecycle>

<csvview></csvview>

<csvteamTemplate>System.TestTeamForLoads</csvteamTemplate>

<csvlifecyclestate>INWORK</csvlifecyclestate>

<csvtypedef></csvtypedef>

<csvversion></csvversion>

<csviteration></csviteration>

<csvparentContainerPath></csvparentContainerPath>

</csvProduct>

<csvEndWTPart handler="wt.part.LoadPart.endCreateWTPart" >

<csvpublishFlag></csvpublishFlag>

<csvparentContainerPath></csvparentContainerPath>

</csvEndWTPart>

<csvAssemblyAddLoad
handler="wt.part.LoadPart.addPartToAssemblyLoad" >

<csvassemblyPartNumber>LoadedAssm-1</csvassemblyPartNumber>

<csvconstituentPartNumber>ExistingPart-
1</csvconstituentPartNumber>

<csvconstituentPartQty>1</csvconstituentPartQty>

<csvconstituentPartUnit>ea</csvconstituentPartUnit>

</csvAssemblyAddLoad>

</NmLoader>

Creating Library Containers


Assuming the XML data below resides in a file called DataFile, it can be
used to load a library with the following command:

windchill wt.load.LoadFromFile -d DataFile.xml -u wcadmin -p


wcadmin -CONT_PATH /wt.inf.container.OrgContainer=MyOrg

The following is an example data file:


<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

6-12 Windchill Data Loading Reference and Best Practices Guide


<csvContainer
handler="wt.inf.container.LoadContainer.createContainer">

<csvcontainerClass>wt.inf.library.WTLibrary</csvcontainerClass>

<csvcontainerName>Loaded
Library</csvcontainerName>

<csvparentContainerPath></csvparentContainerPath>

<csvcontainerTemplateRef>General
Library</csvcontainerTemplateRef>

<csvbusinessNamespace>false</csvbusinessNamespace>

<csvsharingEnabled>true</csvsharingEnabled>

<csvcreator></csvcreator>

<csvowner></csvowner>

<csvsubscriber>true</csvsubscriber>

<csvconferencingURL></csvconferencingURL>

<csvdescription>Loaded
library</csvdescription>

<csvorganization></csvorganization>

<csvcreatorSelector></csvcreatorSelector>

</csvContainer>

</NmLoader>

Example — Batch File


The following is an example batch file:
echo *************************************************

echo ** Variable Setup

echo *************************************************

set tmp_org=/wt.inf.container.OrgContainer=My Organization

echo *************************************************

echo ** Load Libraries

echo *************************************************

windchill wt.load.LoadFromFile -d libraries.xml -u wcadmin -p


wcadmin -CONT_PATH \"%tmp_org%\"

Loading Product Objects and Parts: Windchill PDMLink Example 6-13


Tip: Utilize the "-u" and the "-p" parameters in batch files to eliminate the Logon
dialog box.

Loading Documents in a Library

The following is an example of how to load documents in to a library. In


this example, there is a library named TestIssues in an organization called
MyOrg.

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvBeginWTDocument handler="wt.doc.LoadDoc.beginCreateWTDocument"
>

<csvname>Test Doc 11</csvname>

<csvtitle>Test Doc 11</csvtitle>

<csvnumber>TD11</csvnumber>

<csvtype>Document</csvtype>

<csvdescription>description text</csvdescription>

<csvdepartment>DESIGN</csvdepartment>

<csvsaveIn>/Default</csvsaveIn>

<csvteamTemplate></csvteamTemplate>

<csvdomain></csvdomain>

<csvlifecycletemplate></csvlifecycletemplate>

<csvlifecyclestate></csvlifecyclestate>

<csvtypedef></csvtypedef>

<csvversion>A</csvversion>

<csviteration>1</csviteration>

</csvBeginWTDocument>

<csvEndWTDocument handler="wt.doc.LoadDoc.endCreateWTDocument" >

<csvprimarycontenttype>ApplicationData</csvprimarycontenttype>

<csvpath>DGadReq.doc</csvpath>

<csvformat></csvformat>

<csvcontdesc></csvcontdesc>

<csvparentContainerPath></csvparentContainerPath>

</csvEndWTDocument></NmLoader>

6-14 Windchill Data Loading Reference and Best Practices Guide


The following command can then be used to load a document with name Test Doc
11 and number TD11 into the root folder of the library called TestIssues:
D:\8.0\Windchill>windchill wt.load.LoadFromFile -d d:\8.0\
Windchill\loadFiles\TestDoc.xml -CONT_PATH \
"/wt.inf.container.OrgContainer=MyOrg/wt.inf.library.WTLibrary=Tes
tIssues\"

Note: If you want to load the document in a subfolder called Folder1 in the
library, then you would use the following for the csvSaveIn field of the XML file:
/Default/Folder1

Given this, the XML file would look as follows:


<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvBeginWTDocument handler="wt.doc.LoadDoc.beginCreateWTDocument"
>

<csvname>Test Doc 11</csvname>

<csvtitle>Test Doc 11</csvtitle>

<csvnumber>TD11</csvnumber>

<csvtype>Document</csvtype>

<csvdescription>description text</csvdescription>

<csvdepartment>DESIGN</csvdepartment>

<csvsaveIn>/Default/Folder1</csvsaveIn>

<csvteamTemplate></csvteamTemplate>

<csvdomain></csvdomain>

<csvlifecycletemplate></csvlifecycletemplate>

<csvlifecyclestate></csvlifecyclestate>

<csvtypedef></csvtypedef>

<csvversion>A</csvversion>

<csviteration>1</csviteration>

</csvBeginWTDocument>

<csvEndWTDocument handler="wt.doc.LoadDoc.endCreateWTDocument" >

<csvprimarycontenttype>ApplicationData</csvprimarycontenttype>

<csvpath>DGadReq.doc</csvpath>

<csvformat></csvformat>

<csvcontdesc></csvcontdesc>

Loading Product Objects and Parts: Windchill PDMLink Example 6-15


<csvparentContainerPath></csvparentContainerPath>

</csvEndWTDocument>

</NmLoader>

Loading Documents that Are Soft Types of an Out-of-the-box Type


The following is an example of how to load documents that are soft-types of an
out-of-the-box type.

This example assumes the following:


• A library called MyLib exists and contain a folder called Folder1.
• A soft-type of the out-of-the-box Reference Document, called SubOfRef, was
created with two attributes:
a. MBool, a boolean
b. MString, a String
• An organization called MyOrg exists.
Given the above assumptions, the load can be performed using the following
command:
windchill wt.load.LoadFromFile -d C:\Path\To\MyFile.xml -u wcadmin
-p wcadmin -CONT_PATH \
"/wt.inf.container.OrgContainer=MyOrg/wt.inf.library.WTLibrary=MyL
ib\"

The following is an example data file:

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvBeginWTDocument handler="wt.doc.LoadDoc.beginCreateWTDocument"
>

<csvname>Name of SoftType Load - 01</csvname>

<csvtitle>Title of SoftType Load - 01</csvtitle>

<csvnumber>NUM:SoftType-01</csvnumber>

<csvtype>Document</csvtype>

<csvdescription>description 1112-002</csvdescription>

<csvdepartment>DESIGN</csvdepartment>

<csvsaveIn>/Default/Folder1</csvsaveIn>

<csvteamTemplate></csvteamTemplate>

<csvdomain></csvdomain>

6-16 Windchill Data Loading Reference and Best Practices Guide


<csvlifecycletemplate></csvlifecycletemplate>

<csvlifecyclestate></csvlifecyclestate>

<csvtypedef>com.ptc.ReferenceDocument|
com.ptc.SubOfRef</csvtypedef>

<csvversion></csvversion>

<csviteration></csviteration>

</csvBeginWTDocument>

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>MyAttrs/MBool</csvdefinition>

<csvvalue1>false</csvvalue1>

<csvvalue2></csvvalue2>

<csvdependency_id></csvdependency_id>

</csvIBAValue>

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>MyAttrs/MString</csvdefinition>

<csvvalue1>Eleven</csvvalue1>

<csvvalue2></csvvalue2>

<csvdependency_id></csvdependency_id>

</csvIBAValue>

</csvEndWTDocument>

</NmLoader>

Loading Product Objects and Parts


Creating product objects introduces the need to separate load files. Most likely,
product objects and parts will be loaded into a product container. This product
container belongs to an organization. When calling the load utility
(wt.load.LoadFromFile) it is necessary to add the container path after the
organization. For this reason, only objects to be loaded into the container path
specified on the call to wt.load.LoadFromFile should be grouped together.
In this example, the same converted XML file from the call to CSV2XML is used
as the starting point.

Loading Product Objects and Parts: Windchill PDMLink Example 6-17


It is necessary to know the product names to be created. This information can be
fed into a batch file that converts XML into the proper format and separates load
files.
In general, the preparation of the product object load files consists of:
1. Copy the products load file used as input for transform from "Product
Containers".
2. Edit the input file (one copied above).
3. Search and replace <csvProduct, with <JProduct><csvProduct.
4. Search and replace .endIBAHolder" /> with .endIBAHolder" /></JProduct>.
5. Save the file.
6. Edit the main transform batch file to make sure it has the proper products.
7. Edit the secondary transform batch file to set the base names for input and
output.
8. Execute the custom transforms.
9. Use the output files and load data into Windchill PDMLink.

Step 1
Edit the output file of the CSV2XML conversion process used to create the
product containers. Search and replace the beginning and ending tag as identified
above. The result should look similar to:
<?xml version="1.0" ?>

<NmLoader>

<JProduct><csvProduct handler="wt.part.LoadPart.createProduct" >

<csvuser></csvuser>

<csvpartName>FINAL ASSEMBLY</csvpartName>

<csvpartNumber>88-839-123</csvpartNumber>

<csvtype>fg</csvtype>

<csvsource>make</csvsource>

<csvfolder>/88-839-123</csvfolder>

<csvlifecycle>Default No Routing</csvlifecycle>

<csvview></csvview>

<csvteamTemplate>System.Default</csvteamTemplate>

<csvlifecyclestate>RELEASED</csvlifecyclestate>

<csvtypedef></csvtypedef>

6-18 Windchill Data Loading Reference and Best Practices Guide


<csvversion>-</csvversion>

<csviteration>1</csviteration>

<csvparentContainerPath></csvparentContainerPath>

</csvProduct>

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>AttribContr/Productline</csvdefinition>

<csvvalue1>Military</csvvalue1>

<csvvalue2></csvvalue2>

<csvdependency_id></csvdependency_id>

</csvIBAValue>

<csvendIBAHolder
handler="wt.iba.value.service.LoadValue.endIBAHolder"
/></JProduct>

<JProduct><csvProduct handler="wt.part.LoadPart.createProduct" >

<csvpartName>44-33-11-123 Super Wide Widget</csvpartName>

<csvpartNumber>44-33-111-123</csvpartNumber>

<csvtype>fg</csvtype>

<csvsource>make</csvsource>

……………..

……………..

……………..

……………..

The addition of these tags is an import step to assist in the XML transform needed
to process this single file.

Step 2
This example uses a custom developed XML transform. The following transform
will accept as a Parameter a Product. The transform will filter the main
Product.xml file looking for matches, when one is found, it will be properly
formatted and placed into an output file.
<?xml version="1.0" encoding="iso-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

Loading Product Objects and Parts: Windchill PDMLink Example 6-19


<xsl:output method="xml" indent="yes" encoding="iso-8859-1"
doctype-system="standardX05.dtd"/>

<xsl:param name="prod_to_match" select="'EMPTY'"/>

<xsl:template match="/">

<NmLoader>

<xsl:for-each select="//JProduct">

<xsl:if test="csvProduct/csvfolder=concat('/',
$prod_to_match)">

<csvProduct handler="wt.part.LoadPart.createProduct" >

<csvpartName>

<xsl:value-of select="csvProduct/csvpartNumber"/>

</csvpartName>

<csvpartNumber>

<xsl:value-of select="csvProduct/csvpartNumber"/>

</csvpartNumber>

<csvtype>

<xsl:value-of
select="translate(csvProduct/csvtype,'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')"/>

</csvtype>

<csvsource>

<xsl:value-of select="csvProduct/csvsource"/>

</csvsource>

<csvfolder>/Default</csvfolder>

<csvlifecycle>Default No Routing</csvlifecycle>

<csvview></csvview>

<csvteamTemplate></csvteamTemplate>

<csvlifecyclestate></csvlifecyclestate>

<csvtypedef></csvtypedef>

<csvversion>

<xsl:value-of select="csvProduct/csvversion"/>

</csvversion>

<csviteration>

6-20 Windchill Data Loading Reference and Best Practices Guide


<xsl:value-of select="number(csvProduct/csviteration
+ 1)"/>

</csviteration>

<csvparentContainerPath></csvparentContainerPath>

</csvProduct>

<xsl:for-each select="csvIBAValue">

<csvIBAValue
handler="wt.iba.value.service.LoadValue.createIBAValue" >

<csvdefinition>

<xsl:value-of select="csvdefinition"/>

</csvdefinition>

<csvvalue1>

<xsl:value-of select="csvvalue1"/>

</csvvalue1>

<csvvalue2></csvvalue2>

<csvdependency_id></csvdependency_id>

</csvIBAValue>

</xsl:for-each>

<csvEndWTPart handler="wt.part.LoadPart.endCreateWTPart" >

<csvpublishFlag></csvpublishFlag>

<csvparentContainerPath></csvparentContainerPath>

</csvEndWTPart>

</xsl:if>

</xsl:for-each>

</NmLoader>

</xsl:template>

</xsl:stylesheet>

Tip: Add custom code to check and manipulate data values. The above transform
converts from upper to lower case Part Type value.

Loading Product Objects and Parts: Windchill PDMLink Example 6-21


Step 3
The above transform should be processed once for each product than needs to be
created. Creating two batch files can automate the execution of the transform.
The first batch file (g.bat) is a control batch file with all the Products to be created.
@echo off

cls

call go.bat 123

call go.bat 456

call go.bat 967SA

The Second batch file (go.bat) executes the transform and produces
output files.

@echo off

Cls

Echo.

Echo -------------------------------------------------------------
-----------

Echo Get Current Classpath and hold it

Echo -------------------------------------------------------------
-----------

Echo Classpath at start is: %CLASSPATH%

set _oldclspth=%CLASSPATH%

echo .

echo .

Echo -------------------------------------------------------------
-----------

Echo Variable Setup

Echo -------------------------------------------------------------
-----------

REM NORMALLY %1 would be used a parm variable, however, in the case


that a parm

REM has a space like "Common Parts" the file thinks there are 2
parms %1 and %2 so:

REM %* will return all command line parameters following %0;

6-22 Windchill Data Loading Reference and Best Practices Guide


REM keep in mind that Windows NT 4 will insert an extra space before
%*,

REM whereas 2000 and XP will remove all leading spaces from %*;

set _in=abc_prods.xml

set _out=toload\%*_data.xml

set _xsl=2products.xsl

echo Input file = %_in%

echo Output file = %_out%

echo XSL file = %_xsl%

echo .

echo .

Echo -------------------------------------------------------------
-----------

Echo Modify Current Classpath by adding Jars to Classpath

Echo -------------------------------------------------------------
-----------

set CLASSPATH=.;D:\xalan\bin;D:\xalan\bin\xalan.jar;D:\xalan\bin\
xercesImpl.jar;D:\xalan\bin\xsltc.jar;%CLASSPATH%;

Echo Modified Classpath is now: %CLASSPATH%

echo .

echo .

Echo -------------------------------------------------------------
-----------

Echo Execute the Transform

Echo -------------------------------------------------------------
-----------

java UseStylesheetParam %_in% "%_out%" %_xsl% "%*"

echo .

echo .

Loading Product Objects and Parts: Windchill PDMLink Example 6-23


Echo -------------------------------------------------------------
-----------

Echo Return the Classpath back

Echo -------------------------------------------------------------
-----------

set CLASSPATH=%_oldclspth%

Echo Classpath at the end is: %CLASSPATH%

echo .

echo .

Tip: Use a Java Class to execute the transform. This allows the use of
parameters. In this case, the parameter passed to the stylesheet is used to filter the
output to just the objects that belong in the specified container path.

The data should now be ready for loading.

Example - Batch File


For objects that belong in product container, Prod_001, execute on one line the
following command:
windchill wt.load.LoadFromFile -d prod_objs.xml -u wcoracle -p
wcoracle -CONT_PATH \"/wt.inf.container.OrgContainer=My
Organization/wt.pdmlink.PDMLinkProduct=Prod_001\"

Loading Parts with Specific Lifecycle and Team Templates


A part can be loaded into a library as a standalone part, or it can be loaded into a
product.
The primary difference is the target objects specified in the -CONT_PATH
argument. In the first example code, Loading with a Product Called MyProd in
MyOrg, you are loading a part into a Product. In the second procedure, Loading
with a Library Called MyLib in MyOrg, you are loading a part into a library. The
same data file can be used to load a part into a product structure (End Item), or
into a library.
When loading with a product, you would use wt.pdmlink.PDMLinkProduct (for
example, \"/wt.inf.container.OrgContainer=
MyOrg/wt.pdmlink.PDMLinkProduct=MyProd\")
When loading with a library, you would use wt.inf.library.WTLibrary (for
example, \"/wt.inf.container.OrgContainer=
MyOrg/wt.inf.library.WTLibrary=MyLib\")
You will load parts into a product container or a library container. Examples of
the syntax are shown below.

6-24 Windchill Data Loading Reference and Best Practices Guide


Loading with a Product Called MyProd in MyOrg
windchill wt.load.LoadFromFile -d <Datafile> -CONT_PATH \
"/wt.inf.container.OrgContainer=MyOrg/wt.pdmlink.PDMLinkProduct=My
Prod\"

Loading with a Library Called MyLib in MyOrg


windchill wt.load.LoadFromFile -d <Datafile> -CONT_PATH \
"/wt.inf.container.OrgContainer=MyOrg/wt.inf.library.WTLibrary=MyL
ib\"

About Escape Characters


The backslash ("\") character denotes an escape character. Its usage in the
-CONT_PATH argument follows this rule:
If the value(s) for /wt.inf.container.OrgContainer, /wt.pdmlink.PDMLinkProduct,
or /wt.inf.library.WTLibrary contain spaces, then the entire argument should be
enclosed in quotes ("").
However, due to quotes being special characters, they need to be escaped with a
backslash. If there are no spaces in the organization, product, or library container
name, then it is not necessary to provide the leading \" and trailing \". If there are
spaces, then the leading \" and trailing \" are required and the loader will present
errors if they are missing.

Loading Into a Specific Team Template and Lifecycle


In the following example, TestTeamForLoads is the desired TeamTemplate and
Basic is the desired Lifecycle for the part.
<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvProduct handler="wt.part.LoadPart.beginCreateWTPart" >

<csvpartName>TestPart-01</csvpartName>

<csvpartNumber>TestPart-01</csvpartNumber>

<csvtype>separable</csvtype>

<csvsource>make</csvsource>

<csvfolder>/Default</csvfolder>

<csvlifecycle>Basic</csvlifecycle>

<csvview></csvview>

<csvteamTemplate>System.TestTeamForLoads</csvteamTemplate>

<csvlifecyclestate>INWORK</csvlifecyclestate>

<csvtypedef></csvtypedef>

Loading Product Objects and Parts: Windchill PDMLink Example 6-25


<csvversion></csvversion>

<csviteration></csviteration>

<csvparentContainerPath></csvparentContainerPath>

</csvProduct>

<csvEndWTPart handler="wt.part.LoadPart.endCreateWTPart" >

<csvpublishFlag></csvpublishFlag>

<csvparentContainerPath></csvparentContainerPath>

</csvEndWTPart>

</NmLoader>

Loading Relationships Between Parts and Documents


The describedBy link on a part links to a specific document iteration. The
referencedBy link links to a document master (not a specific iteration of the
document).
The <csvPartDocReference> tag creates the referencedBy link and the
<csvPartDocDescribes> tag creates the describedBy link.

Example 1
In this first example, we want to add document number DOC100 as a reference
document on part PART100, version D, iteration 1, in the Manufacturing view.
The XML should resemble the following:
<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvPartDocReference
handler="wt.part.LoadPart.createPartDocReference">

<csvdocNumber>DOC100</csvdocNumber>

<csvpartNumber>PART100</csvpartNumber>

<csvpartVersion>D</csvpartVersion>

<csvpartIteration>1</csvpartIteration>

<csvpartView>Manufacturing</csvpartView>

</csvPartDocReference>

</NmLoader>

6-26 Windchill Data Loading Reference and Best Practices Guide


Example 2
In this second example, we will add document number DOC100, version A,
iteration 2 as a describing document for part number PART100, version D,
iteration 1, in the Manufacturing view.
The XML should resemble the following:
<?xml version="1.0"?>

<!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvPartDocDescribes
handler="wt.part.LoadPart.createPartDocDescribes">

<csvdocNumber>DOC100</csvdocNumber>

<csvdocVersion>A</csvdocVersion>

<csvdocIteration>2</csvdocIteration>

<csvpartNumber>PART100</csvpartNumber>

<csvpartVersion>D</csvpartVersion>

<csvpartIteration>1</csvpartIteration>

<csvpartView>Manufacturing</csvpartView>

</csvPartDocDescribes>

</NmLoader>

Tag Descriptions
As shown in the examples above, the following tags are used by both the
<csvPartDocReference> and <csvPartDocDescribes> tags to create the
referencedBy and describedBy links, respectively.
Below is a description of the tags and whether they have optional or required
values.
• <csvdocNumber>: This tag is for the document number. A value is required.
• <csvdocVersion>: This is the document version. If no value is specified, the
latest version is used.
• <csvdocIteration>: This is the document iteration. If no value is specified, the
latest iteration is used.
• <csvpartNumber>: This is the part number. A value is required.
• <csvpartVersion>: This is the part version. If no value is specified, the latest
version is used.

Loading Product Objects and Parts: Windchill PDMLink Example 6-27


• <csvpartIteration>: This is the part iteration. If no value is specified, the latest
iteration is used.
• <csvpartView>: This is the part's view. If no value is specified, the part not
assigned a view is used.

6-28 Windchill Data Loading Reference and Best Practices Guide


7
Loading Documents:
Pro/INTRALINK 8.0 Example

This chapter provides a detailed example of the data loading process for
documents in a Pro/INTRALINK 8.0 system.
For detailed information on Pro/INTRALINK, refer to the Getting Started with
Pro/INTRALINK 8.0. The most recent version of this guide is available from the
Library page of your Pro/INTRALINK installation.

Section Page
Loading Documents in a Pro/INTRALINK 8.0 System .....................................7-2
Sample Data File for Pro/INTRALINK ..............................................................7-2

Loading Documents: Pro/INTRALINK 8.0 Example 7-1


Loading Documents in a Pro/INTRALINK 8.0 System
In Pro/INTRALINK 8.0, you use PDM capabilities to manage CAD documents
and documents. Pro/INTRALINK supports loading of documents, but does not
support loading of CAD documents via the LoadFromFile framework.
The process for loading documents to Pro/INTRALINK is the same as loading
parts or CAD documents into another Windchill solution. Refer to The Data
Loading Process earlier in this guide.
The load utility is prefixed by "windchill". An example command for loading
documents would be:
windchill wt.load.LoadFromFile -d ProIDoc.xml -CONT_PATH
"/wt.inf.container.OrgContainer=TST/wt.pdmlink.PDMLinkProduct=p
art 4\"

Tip: Run the utility from the same directory where the data file resides.

Loading a Library
The command for loading a library to Pro/INTRALINK would resemble the
following:
windchill wt.load.LoadFromFile -d OneDocSet.xml -CONT_PATH \
"/wt.inf.container.OrgContainer=carrie/wt.inf.library.WTLibrary=
VersionTest\"

Sample Data File for Pro/INTRALINK


Below is sample XML that could be loaded as a file into Pro/INTRALINK. Data
files must be in XML format and must comply with the DTD supplied with the
Windchill installation (available from the standardX05 directory). Refer to
Validating the XML Format earlier in this guide for information on creating and
validating XML data files.

Sample XML Code for Loading Documents


<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX05.dtd">

<NmLoader>

<csvBeginWTDocument handler="wt.doc.LoadDoc.beginCreateWTDocument"
>

<csvname>A1002</csvname>

<csvtitle>title text</csvtitle>

<csvnumber>A1002</csvnumber>

<csvtype>Document</csvtype>

<csvdescription>description text</csvdescription>

<csvdepartment>DESIGN</csvdepartment>

7-2 Windchill Data Loading Reference and Best Practices Guide


<csvsaveIn>/Default/Folder 1</csvsaveIn>

<csvteamTemplate></csvteamTemplate>

<csvdomain></csvdomain>

<csvlifecycletemplate></csvlifecycletemplate>

<csvlifecyclestate></csvlifecyclestate>

<csvtypedef></csvtypedef>

<csvversion>A</csvversion>

<csviteration>1</csviteration>

</csvBeginWTDocument>

<csvEndWTDocument handler="wt.doc.LoadDoc.endCreateWTDocument" >

<csvprimarycontenttype>ApplicationData</csvprimarycontenttype>

<csvpath>DGadReq.doc</csvpath>

<csvformat></csvformat>

<csvcontdesc></csvcontdesc>

<csvparentContainerPath></csvparentContainerPath>

</csvEndWTDocument>

<csvBeginWTDocument handler="wt.doc.LoadDoc.beginCreateWTDocument"
>

<csvname>A1003</csvname>

<csvtitle>title text</csvtitle>

<csvnumber>A1003</csvnumber>

<csvtype>Document</csvtype>

<csvdescription>description text</csvdescription>

<csvdepartment>DESIGN</csvdepartment>

<csvsaveIn>/Default</csvsaveIn>

<csvteamTemplate></csvteamTemplate>

<csvdomain></csvdomain>

<csvlifecycletemplate></csvlifecycletemplate>

<csvlifecyclestate></csvlifecyclestate>

<csvtypedef></csvtypedef>

<csvversion></csvversion>

<csviteration></csviteration>

Loading Documents: Pro/INTRALINK 8.0 Example 7-3


</csvBeginWTDocument>

<csvEndWTDocument handler="wt.doc.LoadDoc.endCreateWTDocument" >

<csvprimarycontenttype>ApplicationData</csvprimarycontenttype>

<csvpath>DGadReq.doc</csvpath>

<csvformat></csvformat>

<csvcontdesc></csvcontdesc>

<csvparentContainerPath></csvparentContainerPath>

</csvEndWTDocument>

</NmLoader>

7-4 Windchill Data Loading Reference and Best Practices Guide

You might also like