Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi ,
I have an excel sheet with legacy (WTDocument) data and want to load into windchill. The data is WTDocument data nad it have some custom attributes.
So to do this which is better way.
1. Modify dtd files and write a custom code to handle attributes and use LoadFrom File utility.
2. Write a object creation class and assign values to the objects by reading from excel sheet.
Suggest me the best way to do this and the reason behind that.
Thank You,
HI,
had a smilar situation a while ago where I had to load a few hundred PDf files as documents in PDMLink. My chosen solution at the time was to ceate a standalone java app which took the excel file as csv, and created an import file. Then loaded using the 'import/export' tool in teh relevant product.
Tasks the app did were:
once had all files, just zipped up and used the import tool.
Luckily for me though I new on this occasions that the files would nto already be in Windchill, so did not have to deal with number clashes.
COuld do with tweaking and maybe integrating more directly with Windchill , but worked a treat.
Over time we've loaded over 20,000 WTDocuments using the load from file commands - works perfectly if you get the syntax right. Have not used with any WTDoc attributes - would love to see example if you get that to work.
ref:
Hi Mike.
You are right.OOTD have two saperate loader one for Document loading and one for IBA loading.
So now I created a custom Document loader which will load documents and also add IBA's on the go.
You can definitely create a single load file which includes custom soft type attributes loaded as IBAs. (10.1 M040 & 10.2 M010 verified)
Example of a single Document record (csv file) with x3 custom attributes.....
The CSV2XML output XML would look like.....
<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX24.dtd">
<NmLoader>
<csvBeginWTDocument handler="wt.doc.LoadDoc.beginCreateWTDocument" >
<csvname>NameofDocument</csvname>
<csvtitle>TitleofDocument</csvtitle>
<csvnumber></csvnumber>
<csvtype>Document</csvtype>
<csvdescription>DescriptionofDocument</csvdescription>
<csvdepartment>DESIGN</csvdepartment>
<csvsaveIn>/Default</csvsaveIn>
<csvteamTemplate></csvteamTemplate>
<csvdomain></csvdomain>
<csvlifecycletemplate>Our-Lifecycle</csvlifecycletemplate>
<csvlifecyclestate>RELEASED</csvlifecyclestate>
<csvtypedef>com.ourdomain.SubType_Document</csvtypedef>
<csvversion>C</csvversion>
<csviteration>1</csviteration>
<csvsecurityLabels></csvsecurityLabels>
</csvBeginWTDocument>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
<csvdefinition>com.ourdomain.attributeone</csvdefinition>
<csvvalue1>ValueOne</csvvalue1>
<csvvalue2></csvvalue2>
<csvdependency_id></csvdependency_id>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
<csvdefinition>com.ourdomain.attribute</csvdefinition>
<csvvalue1>ValueTwo</csvvalue1>
<csvvalue2></csvvalue2>
<csvdependency_id></csvdependency_id>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
<csvdefinition>com.ourdoamin.attributethree</csvdefinition>
<csvvalue1>ValueThree</csvvalue1>
<csvvalue2></csvvalue2>
<csvdependency_id></csvdependency_id>
</csvIBAValue>
<csvEndWTDocument handler="wt.doc.LoadDoc.endCreateWTDocument" >
<csvprimarycontenttype>ApplicationData</csvprimarycontenttype>
<csvpath>C:\OurLoadFiles\Filename.xxx</csvpath>
<csvformat></csvformat>
<csvcontdesc></csvcontdesc>
<csvparentContainerPath></csvparentContainerPath>
</csvEndWTDocument>
</NmLoader>
If you aren't letting Windchill assigned the Document Number it's also possible to include load elements for Distribution Targets and Described By links in the same file. Note; normally we let WC assigned the Doc. Nbrs. so it's a seperate step to pull WC data to formulate these supplemental loads.
Thank You Ben Thompson. Actually I was doing some lengthy process for IBA.Your description is really very helpful.