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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Windchill loadfrom file templates for creating part substitutes and alternates

BM_10833282
4-Participant

Windchill loadfrom file templates for creating part substitutes and alternates

Hi All,

Recently I have worked on creating the part substitutes and alternates using windchill load from file utility in windchill 12.0.2.18. Since the REST end points were not present in my windchill version need to go with load from file utility. I hope it will be useful for some one looking for a solution to automate these tasks.

Following is the xml template for the same:

 

Load Alternates:

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standard12_0.dtd">
<NmLoader>
<csvBeginCreateUpdateAlternateLink handler="wt.replacement.LoadReplacement.beginCreateUpdateAlternateLink" >
<csvalternatePartNumber>AI-00003</csvalternatePartNumber>
<csvalternatePartName>component2</csvalternatePartName>
<csvalternatePartOrganizationName>DemoOrg</csvalternatePartOrganizationName>
<csvalternatePartOrganizationID></csvalternatePartOrganizationID>
<csvalternateForPartNumber>AI-00002</csvalternateForPartNumber>
<csvalternateForPartName>component1</csvalternateForPartName>
<csvalternateForPartOrganizationName>DemoOrg</csvalternateForPartOrganizationName>
<csvalternateForPartOrganizationID></csvalternateForPartOrganizationID>
<csvtwoWayStatus></csvtwoWayStatus>
<csvreplacementType></csvreplacementType>
</csvBeginCreateUpdateAlternateLink>

<csvEndCreateUpdateAlternateLink handler="wt.replacement.LoadReplacement.endCreateUpdateAlternateLink" />

</NmLoader>

 

LoadCommand:

windchill wt.load.LoadFromFile -d <Path of the xml load file> -u <UserName> -p <Password> -CONT_PATH \"/wt.inf.container.OrgContainer=DemoOrg/wt.pdmlink.PDMLinkProduct=<Your Product Name>\"

 

XML Template for the creating substitutes:

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standard12_0.dtd">
<NmLoader>
<csvBeginCreateUpdateAssemblySubstitute handler="wt.replacement.LoadReplacement.beginCreateUpdateAssemblySubstitute" >
<csvpartNumber>AI-00001</csvpartNumber>
<csvpartName>TopLevelPart</csvpartName>
<csvorganizationName>DemoOrg</csvorganizationName>
<csvorganizationID></csvorganizationID>
<csvversion>A</csvversion>
<csvview>Design</csvview>
</csvBeginCreateUpdateAssemblySubstitute>

<csvBeginCreateUpdateSubstituteLink handler="wt.replacement.LoadReplacement.beginCreateUpdateSubstituteLink" >
<csvsubstituteForPartNumber>AI-00004</csvsubstituteForPartNumber>
<csvsubstituteForPartName>component3</csvsubstituteForPartName>
<csvsubstituteForPartOrganizationName>DemoOrg</csvsubstituteForPartOrganizationName>
<csvsubstituteForPartOrganizationID></csvsubstituteForPartOrganizationID>
<csvsubstituteForLineNumber></csvsubstituteForLineNumber>
<csvsubstitutePartNumber>AI-00005</csvsubstitutePartNumber>
<csvsubstitutePartName>component4</csvsubstitutePartName>
<csvsubstitutePartOrganizationName>DemoOrg</csvsubstitutePartOrganizationName>
<csvsubstitutePartOrganizationID></csvsubstitutePartOrganizationID>
<csvreplacementType></csvreplacementType>
<csvsubstitutePartReferenceDesignator></csvsubstitutePartReferenceDesignator>
<csvsubstitutePartUnit></csvsubstitutePartUnit>
<csvsubstitutePartAmount></csvsubstitutePartAmount>
</csvBeginCreateUpdateSubstituteLink>

<csvEndCreateUpdateSubstituteLink handler="wt.replacement.LoadReplacement.endCreateUpdateSubstituteLink" />

<csvEndCreateUpdateAssemblySubstitute handler="wt.replacement.LoadReplacement.endCreateUpdateAssemblySubstitute" />

</NmLoader>

 

LoadCommand:

windchill wt.load.LoadFromFile -d <Path of the xml load file> -u <UserName> -p <Password> -CONT_PATH \"/wt.inf.container.OrgContainer=DemoOrg/wt.pdmlink.PDMLinkProduct=<Your Product Name>\"

0 REPLIES 0
Announcements


Top Tags