Skip to main content
10-Marble
November 15, 2023
Solved

Loadfromfile for bulk attachment

  • November 15, 2023
  • 1 reply
  • 1338 views

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

Best answer by Fadel

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

Fadel23-Emerald IAnswer
23-Emerald I
November 15, 2023

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