Skip to main content
Nov 15, 2023 2:47 PM UTC
Solved

Loadfromfile for bulk attachment

Hi,

 

We have around 100 wt part already created in our windchill folders. We have each individual attachment as pdf in our local drive. I would like to know step by step process to attach this document in their respective wt parts which were already created. Could you please some one help me here in creating the xml file and where and how to load this file.

 

Regards,

Anand

FadelAnswer
3-Newcomer
Nov 15, 2023 4:25 PM UTC

you have to use loadfromfile  like below example , I used  parts under Site folder,but you can load parts into products , adding below 

-CONT_PATH "wt.inf.container.OrgContainer=<Org_name>/wt.pdmlink.PDMLinkProduct=<Product_name>"

 

 

<?xml version="1.0"?>
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
<NmLoader>
<csvBeginCreateOrUpdateWTPart handler="wt.part.LoadPart.beginCreateOrUpdateWTPart">
<csvpartName>123</csvpartName>
<csvpartNumber>68</csvpartNumber>
<csvtype>separable</csvtype>
<csvgenericType/>
<csvcollapsible/>
<csvlogicbasePath/>
<csvsource>make</csvsource>
<csvfolder>/Default</csvfolder>
<csvlifecycle/>
<csvview/>
<csvvariation1/>
<csvvariation2/>
<csvteamTemplate/>
<csvlifecyclestate>INWORK</csvlifecyclestate>
<csvtypedef>wt.part.WTPart</csvtypedef>
<csvclassToUpdate/>
<csvorganizationName/>
<csvorganizationID/>
<csvsecurityLabels/>
<csvserviceable/>
<csvservicekit/>
</csvBeginCreateOrUpdateWTPart>
<csvContentFile handler="wt.load.LoadContent.createContentFile" >
<csvuser></csvuser>
<csvpath>test.xml</csvpath>
</csvContentFile>
<csvEndCreateOrUpdateWTPart handler="wt.part.LoadPart.endCreateOrUpdateWTPart">
<csvparentContainerPath/>
</csvEndCreateOrUpdateWTPart>
</NmLoader>

 

the PDFs should be under <WC-home>/loadfiles/content 

 

1 reply

FadelAnswer
3-Newcomer
Nov 15, 2023 4:25 PM UTC

you have to use loadfromfile  like below example , I used  parts under Site folder,but you can load parts into products , adding below 

-CONT_PATH "wt.inf.container.OrgContainer=<Org_name>/wt.pdmlink.PDMLinkProduct=<Product_name>"

 

 

<?xml version="1.0"?>
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
<NmLoader>
<csvBeginCreateOrUpdateWTPart handler="wt.part.LoadPart.beginCreateOrUpdateWTPart">
<csvpartName>123</csvpartName>
<csvpartNumber>68</csvpartNumber>
<csvtype>separable</csvtype>
<csvgenericType/>
<csvcollapsible/>
<csvlogicbasePath/>
<csvsource>make</csvsource>
<csvfolder>/Default</csvfolder>
<csvlifecycle/>
<csvview/>
<csvvariation1/>
<csvvariation2/>
<csvteamTemplate/>
<csvlifecyclestate>INWORK</csvlifecyclestate>
<csvtypedef>wt.part.WTPart</csvtypedef>
<csvclassToUpdate/>
<csvorganizationName/>
<csvorganizationID/>
<csvsecurityLabels/>
<csvserviceable/>
<csvservicekit/>
</csvBeginCreateOrUpdateWTPart>
<csvContentFile handler="wt.load.LoadContent.createContentFile" >
<csvuser></csvuser>
<csvpath>test.xml</csvpath>
</csvContentFile>
<csvEndCreateOrUpdateWTPart handler="wt.part.LoadPart.endCreateOrUpdateWTPart">
<csvparentContainerPath/>
</csvEndCreateOrUpdateWTPart>
</NmLoader>

 

the PDFs should be under <WC-home>/loadfiles/content