looking for position number from assemblies structure
looking for position number from assemblies structure
(OP)
Hi,
I'm looking for the position of a part in an assemblies structure to create a BOM by my own.
As I understand the standard BOM functionality in SolidWorks right, the BOM show me in standard configuration the position of the part in the assembly structure tree.
Now I work with 'GetChildren' to recieve the parts (or subassemblies) within an open assembly. (that works fine)
But the returned array are not sorted like the tree.
It seems to be, that the array contains the parts in the way I've inserted it in the assembly.
E.G.
TestPart1
TestPart2
TestAssembly1
The Stucture the tree (and in standard BOM) is :
TestPart2
TestAssembly1
TestPart1
Have anyone an idea how I can get the children in the same way as displayed in the tree ?
Regards,
Christian
I'm looking for the position of a part in an assemblies structure to create a BOM by my own.
As I understand the standard BOM functionality in SolidWorks right, the BOM show me in standard configuration the position of the part in the assembly structure tree.
Now I work with 'GetChildren' to recieve the parts (or subassemblies) within an open assembly. (that works fine)
But the returned array are not sorted like the tree.
It seems to be, that the array contains the parts in the way I've inserted it in the assembly.
E.G.
TestPart1
TestPart2
TestAssembly1
The Stucture the tree (and in standard BOM) is :
TestPart2
TestAssembly1
TestPart1
Have anyone an idea how I can get the children in the same way as displayed in the tree ?
Regards,
Christian






RE: looking for position number from assemblies structure
You can re-order the BOM by right clicking on the BOM and going to properties. Also, You can also right click on the BOm and go to Sort. This will allow you to sort one of the columns by ascending or decending order. I hope this made sense.
BTW what version and SP are you using?
Best Regards,
Jon
Challenges are what makes life interesting; overcoming them is what makes life meaningful.
Solidworks 2005 SP3.0
RE: looking for position number from assemblies structure
thanks for your response. I'm sorry for missing detail information in my question.
My scenario :
we've a BOM on a drawing (standard functionality, no changes made by the user)
Now I want open the assembly via API and get the position number for the parts from the assembly directly. These number must be the same as the automatic generated number from 'insert BOM' function in the drawing.
Meanwhile I read much more internetsites and FAQ's and it seems to be that this is not possible :-(
I think the only way to get the right position number for parts is, to find the assembly's drawing, open it, find the BOM on it and read the values from it. ;-|
The makro should work for SolidWorks 2005
Regards,
Christian