I am using SW document API to get the files pathes of all components, including all of the subassemblies and its parts.
but with below code, just only get top level of the assembly , any buddy can tell me what is the problem ?
thank you very much.
I don't believe you will be able to access any level directly. You will have to write your functions recursively to get to arbitrary depth.
The assembly document you are traversing does not "know" the components of the subassemblies. It only knows the top level. When you open that assembly inside SolidWorks, the subassemblies are all opened in the background to build the entire tree.
You will have to get the document referenced by each top level component and, if it's an assembly document, traverse its components.
trhank you Josh,
The most difficuilt thing is get into each level.
The depth of the assembly is different all the time from CAD users.
So is there any member/method of SWDM to get each level directly , or we have to calculate it by using the VB.NET(I am using this tool) programing method to achieve it ?
thank you for sharing .
thank you for your advice.
Retrieving data ...