Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hello all,
we use LoadFromFile utility to load parts , docs, n BOMs in Windchill.
i have a multilevel BOM.
as below..
I Found on Bom.XMl on PTC TAN: 129544.. Which gives a simple BOM.XML as below..
<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standard70.dtd">
<NmLoader>
<csvCachePart handler="wt.part.LoadPart.cachePart" >
<csvpartNumber>asmA</csvpartNumber>
<csvpartVersion>C</csvpartVersion>
<csvpartIteration></csvpartIteration>
<csvpartView></csvpartView>
</csvCachePart>
<csvCachePart handler="wt.part.LoadPart.cachePart" >
<csvpartNumber>prtC</csvpartNumber>
<csvpartVersion></csvpartVersion>
<csvpartIteration></csvpartIteration>
<csvpartView></csvpartView>
</csvCachePart>
<csvCachePart handler="wt.part.LoadPart.cachePart" >
<csvpartNumber>prtD</csvpartNumber>
<csvpartVersion></csvpartVersion>
<csvpartIteration></csvpartIteration>
<csvpartView></csvpartView>
</csvCachePart>
<csvOccurrencedAssemblyAdd handler="wt.part.LoadPart.addPartToOccurrencedAssembly" >
<csvassemblyPartNumber>asmA</csvassemblyPartNumber>
<csvassemblyPartVersion>C</csvassemblyPartVersion>
<csvconstituentPartNumber>prtC</csvconstituentPartNumber>
<csvconstituentPartQty>1</csvconstituentPartQty>
<csvconstituentPartUnit>ea</csvconstituentPartUnit>
<csvlineNumber>10000</csvlineNumber>
<csvoccurrenceLocation></csvoccurrenceLocation>
<csvreferenceDesignator></csvreferenceDesignator>
<csvassemblyPartIteration></csvassemblyPartIteration>
<csvassemblyPartView></csvassemblyPartView>
</csvOccurrencedAssemblyAdd>
<csvOccurrencedAssemblyAdd handler="wt.part.LoadPart.addPartToOccurrencedAssembly" >
<csvassemblyPartNumber>asmA</csvassemblyPartNumber>
<csvassemblyPartVersion>C</csvassemblyPartVersion>
<csvconstituentPartNumber>prtD</csvconstituentPartNumber>
<csvconstituentPartQty>1</csvconstituentPartQty>
<csvconstituentPartUnit>ea</csvconstituentPartUnit>
<csvlineNumber>100</csvlineNumber>
<csvoccurrenceLocation></csvoccurrenceLocation>
<csvreferenceDesignator></csvreferenceDesignator>
<csvassemblyPartIteration></csvassemblyPartIteration>
<csvassemblyPartView></csvassemblyPartView>
</csvOccurrencedAssemblyAdd>
</NmLoader>
********************************************
This is for only 1 level Child part..
Please any one had done Multilevel BOM Loading Before...Please share the format of MultilevelBom.csv for loading in to Windchill.
Thanks,
Vivek
Solved! Go to Solution.
Make sure you use the right DTD for your release. Use standardX10.dtd for 9.0 and 9.1. Use standardX12.dtd for 10.0 and 10.1.
Make sure you load/create any products, folders, users, etc. before loading the parts.
There are multiple ways to create the parts and to create the usage links.
Then load the parts and then the usage links.
Here is a simple way (if you don't care about occurrences).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
<NmLoader>
<!-- Parts -->
<csvPart handler="wt.part.LoadPart.createPart">
<csvuser/>
<csvpartName>YourTopPart</csvpartName>
<csvpartNumber>YOUR_TOP_PART</csvpartNumber>
<csvtype>separable</csvtype>
<csvsource>make</csvsource>
<csvfolder>/Default/YourFolder</csvfolder>
<csvlifecycle>Basic</csvlifecycle>
<csvview>Design</csvview>
<csvteamTemplate/>
<csvlifecyclestate>INWORK</csvlifecyclestate>
<csvtypedef/>
<csvversion>A</csvversion>
<csviteration>1</csviteration>
<csvparentContainerPath/>
<csvorganizationName/>
<csvorganizationID/>
</csvPart>
<csvPart handler="wt.part.LoadPart.createPart">
<csvuser/>
<csvpartName>YourMiddlePart</csvpartName>
<csvpartNumber>YOUR_MIDDLE_PART</csvpartNumber>
<csvtype>separable</csvtype>
<csvsource>make</csvsource>
<csvfolder>/Default/YourFolder</csvfolder>
<csvlifecycle>Basic</csvlifecycle>
<csvview>Design</csvview>
<csvteamTemplate/>
<csvlifecyclestate>INWORK</csvlifecyclestate>
<csvtypedef/>
<csvversion>A</csvversion>
<csviteration>1</csviteration>
<csvparentContainerPath/>
<csvorganizationName/>
<csvorganizationID/>
</csvPart>
<csvPart handler="wt.part.LoadPart.createPart">
<csvuser/>
<csvpartName>YourBottomPart</csvpartName>
<csvpartNumber>YOUR_BOTTOM_PART</csvpartNumber>
<csvtype>separable</csvtype>
<csvsource>make</csvsource>
<csvfolder>/Default/YourFolder</csvfolder>
<csvlifecycle>Basic</csvlifecycle>
<csvview>Design</csvview>
<csvteamTemplate/>
<csvlifecyclestate>INWORK</csvlifecyclestate>
<csvtypedef/>
<csvversion>A</csvversion>
<csviteration>1</csviteration>
<csvparentContainerPath/>
<csvorganizationName/>
<csvorganizationID/>
</csvPart>
<!-- Usage Links -->
<csvAssemblyAddLoad handler="wt.part.LoadPart.addPartToAssemblyLoad">
<csvassemblyPartNumber>YOUR_TOP_PART</csvassemblyPartNumber>
<csvconstituentPartNumber>YOUR_MIDDLE_PART</csvconstituentPartNumber>
<csvconstituentPartQty>1.0</csvconstituentPartQty>
<csvconstituentPartUnit>ea</csvconstituentPartUnit>
<csvcomponentId/>
<csvquantityOption/>
<csvreference/>
<csvassemblyPartVersion/>
<csvassemblyPartIteration/>
<csvassemblyPartView>Design</csvassemblyPartView>
</csvAssemblyAddLoad>
<csvAssemblyAddLoad handler="wt.part.LoadPart.addPartToAssemblyLoad">
<csvassemblyPartNumber>YOUR_MIDDLE_PART</csvassemblyPartNumber>
<csvconstituentPartNumber>YOUR_BOTTOM_PART</csvconstituentPartNumber>
<csvconstituentPartQty>1.0</csvconstituentPartQty>
<csvconstituentPartUnit>ea</csvconstituentPartUnit>
<csvcomponentId/>
<csvquantityOption/>
<csvreference/>
<csvassemblyPartVersion/>
<csvassemblyPartIteration/>
<csvassemblyPartView>Design</csvassemblyPartView>
</csvAssemblyAddLoad>
</NmLoader>
Make sure you use the right DTD for your release. Use standardX10.dtd for 9.0 and 9.1. Use standardX12.dtd for 10.0 and 10.1.
Make sure you load/create any products, folders, users, etc. before loading the parts.
There are multiple ways to create the parts and to create the usage links.
Then load the parts and then the usage links.
Here is a simple way (if you don't care about occurrences).
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
<NmLoader>
<!-- Parts -->
<csvPart handler="wt.part.LoadPart.createPart">
<csvuser/>
<csvpartName>YourTopPart</csvpartName>
<csvpartNumber>YOUR_TOP_PART</csvpartNumber>
<csvtype>separable</csvtype>
<csvsource>make</csvsource>
<csvfolder>/Default/YourFolder</csvfolder>
<csvlifecycle>Basic</csvlifecycle>
<csvview>Design</csvview>
<csvteamTemplate/>
<csvlifecyclestate>INWORK</csvlifecyclestate>
<csvtypedef/>
<csvversion>A</csvversion>
<csviteration>1</csviteration>
<csvparentContainerPath/>
<csvorganizationName/>
<csvorganizationID/>
</csvPart>
<csvPart handler="wt.part.LoadPart.createPart">
<csvuser/>
<csvpartName>YourMiddlePart</csvpartName>
<csvpartNumber>YOUR_MIDDLE_PART</csvpartNumber>
<csvtype>separable</csvtype>
<csvsource>make</csvsource>
<csvfolder>/Default/YourFolder</csvfolder>
<csvlifecycle>Basic</csvlifecycle>
<csvview>Design</csvview>
<csvteamTemplate/>
<csvlifecyclestate>INWORK</csvlifecyclestate>
<csvtypedef/>
<csvversion>A</csvversion>
<csviteration>1</csviteration>
<csvparentContainerPath/>
<csvorganizationName/>
<csvorganizationID/>
</csvPart>
<csvPart handler="wt.part.LoadPart.createPart">
<csvuser/>
<csvpartName>YourBottomPart</csvpartName>
<csvpartNumber>YOUR_BOTTOM_PART</csvpartNumber>
<csvtype>separable</csvtype>
<csvsource>make</csvsource>
<csvfolder>/Default/YourFolder</csvfolder>
<csvlifecycle>Basic</csvlifecycle>
<csvview>Design</csvview>
<csvteamTemplate/>
<csvlifecyclestate>INWORK</csvlifecyclestate>
<csvtypedef/>
<csvversion>A</csvversion>
<csviteration>1</csviteration>
<csvparentContainerPath/>
<csvorganizationName/>
<csvorganizationID/>
</csvPart>
<!-- Usage Links -->
<csvAssemblyAddLoad handler="wt.part.LoadPart.addPartToAssemblyLoad">
<csvassemblyPartNumber>YOUR_TOP_PART</csvassemblyPartNumber>
<csvconstituentPartNumber>YOUR_MIDDLE_PART</csvconstituentPartNumber>
<csvconstituentPartQty>1.0</csvconstituentPartQty>
<csvconstituentPartUnit>ea</csvconstituentPartUnit>
<csvcomponentId/>
<csvquantityOption/>
<csvreference/>
<csvassemblyPartVersion/>
<csvassemblyPartIteration/>
<csvassemblyPartView>Design</csvassemblyPartView>
</csvAssemblyAddLoad>
<csvAssemblyAddLoad handler="wt.part.LoadPart.addPartToAssemblyLoad">
<csvassemblyPartNumber>YOUR_MIDDLE_PART</csvassemblyPartNumber>
<csvconstituentPartNumber>YOUR_BOTTOM_PART</csvconstituentPartNumber>
<csvconstituentPartQty>1.0</csvconstituentPartQty>
<csvconstituentPartUnit>ea</csvconstituentPartUnit>
<csvcomponentId/>
<csvquantityOption/>
<csvreference/>
<csvassemblyPartVersion/>
<csvassemblyPartIteration/>
<csvassemblyPartView>Design</csvassemblyPartView>
</csvAssemblyAddLoad>
</NmLoader>
Hi,
Patrick is RIght !!!
We are in WC 11.0 M030. I am using Loader to construct single level BOM.
I have Load xml with entries in the following order.
1. List of child parts as CacheParts
2. Entry for parent part as CahcePart
3. AssemblyAdd entries between Parent part and all child parts
Note: Parent part and all child parts are already in system. Loader xml file is to create assembly line items.
Unfortunately I receive only one error all time that is referenced to parent part number. With this I am not able to load single level bom item.
addPartToAssembly: Part "572XXXD1" doesn't exist in the load file or it was not created successfully.
Loader method wt.part.LoadPart.addPartToAssembly reported a failure
Anyone had experience using Loader in WC11 M030. Share your input.
In my view, loading child parts to parent should not be that hard and I have used in the older version of Windchill.
PTC TS could help me with right order to be added in xml file.
Every child addition to parent must have two entries in xml file.
This order has to be repeated for each child part.