cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Bulk Loading Documents in Windchill

sm
1-Newbie
1-Newbie

Bulk Loading Documents in Windchill

I am not a big, bulk loading person, but I found Customer Support article CS38296, to be very helpful if you ever need to do it.

  • Multiple WTDocuments with primary content can be loaded using the following steps.
  • For more details about any of these steps, refer to the "Windchill Data Loading" section of the Windchill Help Center or the Windchill Data Loading Reference and Best Practices Guide for your release of Windchill (see links below):

1. Use a Text Editor to create a CSV file which uses the handlers beginCreateWTDocument, endCreateWTDocument and createContentFile
For example:

#BeginWTDocument,name,title,number,type,description,department,saveIn,teamTemplate,domain,lifecycletemplate,lifecyclestate,typedef,version,iteration,securityLabels
BeginWTDocument,<PRIMARY CONTENT NAME>,<WTDOCUMENT NAME>,<WTDOCUMENT NUMBER>,Document,<WTDOCUMENT DESCRIPTIOIN>,DESIGN,/Default,,,,INWORK,,A,1,
#EndWTDocument,primarycontenttype,path,format,contdesc,parentContainerPath,,,,,,,,,,
EndWTDocument,ApplicationData,<PRIMARY CONTENT FULL PATH>,,,,,,,,,,,,,
#ContentFile,user,path
ContentFile,,<ATTACHMENT FULL PATH>

  • The items in <BRACKETS> should be changed to correspond to the file to be uploaded
  • The other values can also be changed per your configuration e.g. the out-of-the-box first lifecycle state for WTDocuments is INWORK so if your configuration uses a different initial lifecycle state, INWORK would need to be changed to match it
  • Add lines for each document that is to be loaded. The final CSV should look something like this, with one line per handler, per document (no need to repeat the commented lines):

#BeginWTDocument,name,title,number,type,description,department,saveIn,teamTemplate,domain,lifecycletemplate,lifecyclestate,typedef,version,iteration,securityLabels
BeginWTDocument,test.zip,test.zip,0000000001,Document,First test document description,DESIGN,/Default,,,,INWORK,,A,1,
#EndWTDocument,primarycontenttype,path,format,contdesc,parentContainerPath,,,,,,,,,,
EndWTDocument,ApplicationData,D:\test.zip,,,,,,,,,,,,,
#ContentFile,user,path
ContentFile,,D:\test.zip

BeginWTDocument,test2.zip,test2.zip,0000000002,Document,Second test document description,DESIGN,/Default,,,,INWORK,,A,1,
EndWTDocument,ApplicationData,D:\test2.zip,,,,,,,,,,,,,
ContentFile,,D:\test2.zip

BeginWTDocument,test3.zip,test3.zip,0000000003,Document,Third test document description,DESIGN,/Default,,,,INWORK,,A,1,
EndWTDocument,ApplicationData,D:\test3.zip,,,,,,,,,,,,,
ContentFile,,D:\test3.zip

2. Use the wt.load.util.CSV2XML utility to convert the CSV file to an XML file
Execute the following command from a Windchill Shell:

windchill wt.load.util.CSV2XML -root <CSV FILE DIRECTORY>

3. Use the wt.load.LoadFromFile utility to load the XML file

For example, to load the documents into a Product, execute the following command from a Windchill Shell:

windchill wt.load.LoadFromFile -d <XML FILE FULL PATH> -u <WINDCHILL USER ID> -p <WINDCHILL USER PASSWORD> -CONT_PATH \"/wt.inf.container.OrgContainer=<ORGANIZATION NAME>/wt.pdmlink.PDMLinkProduct=<PRODUCT NAME>\"

  • Example
    • Multiple versions of a WTDocument can be loaded using steps 2 and 3 from above with this xml file

  • For further information about the data loading process, refer to the Windchill Data Loading Reference and Best Practices Guide :

Windchill 9.0

Windchill 9.1
Windchill 10.0
Windchill 10.1
Windchill 10.2

0 REPLIES 0
Top Tags