Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hi,
My customer want to use a csv format to load softype document with primary content and multiple files attachment. My goal consist to obtain an xml file with a primary section for create document, a secondary section for iba and standard attributes, a third section for attachmenst and the end section for primary content. Question : how to specify multiple attachments files in the input csv file format? Can i use CSV2XML utility to generate such xml file?
Thank's.
Nicolas
Hi Nicolas,
using CSV2XML utility you an create this kind of xml file
<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX20.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>
<csvlifecycletemplate></csvlifecycletemplate>
<csvlifecyclestate></csvlifecyclestate>
<csvtypedef>com.ptc.SubOfRef</csvtypedef>
<csvversion></csvversion>
<csviteration></csviteration>
</csvBeginWTDocument>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
<csvdefinition>MyAttrs</csvdefinition>
<csvvalue1>false</csvvalue1>
<csvvalue2></csvvalue2>
<csvdependency_id></csvdependency_id>
</csvIBAValue>
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
<csvdefinition>MyAttrs</csvdefinition>
<csvvalue1>Eleven</csvvalue1>
<csvvalue2></csvvalue2>
<csvdependency_id></csvdependency_id>
</csvIBAValue>
<csvEndWTDocument handler="wt.doc.LoadDoc.endCreateWTDocument" >
<csvprimarycontenttype>ApplicationData</csvprimarycontenttype>
<csvpath>EGadWork.xls</csvpath>
<csvformat></csvformat>
<csvcontdesc></csvcontdesc>
<csvparentContainerPath></csvparentContainerPath>
</csvEndWTDocument>
</NmLoader>
Hi kaushik,
following the format of your XML-file I receive the error:
"Update Document failed: LoadDoc - Failed to save content for file_path = test2.xls
Loader method wt.doc.LoadDoc.endCreateWTDocument reported a failure
..."
I tried to insert the complete path, to put the file in different directories etc, always receiving the same error.
Where do you typically store the files which need to be imported?
Thanks
Anusch
Sorry for late reply You should keep your primary content inside <Windchill Home>\Windchill\loadFiles\content
Thanks for your reply.
However, it turned out that I my error was typing "Application Data" instead of "ApplicationData".
Hi,
I'm working to achieve the similar kind of result using OOTB loaders.
Can you please tell me whether CSV template will have 3 rows for an object if in case we have to create document, add attachment, update an IBA.
Is possible, can you share me the csv template used.