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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

List all components from assembly using API

Manjunath
13-Aquamarine

List all components from assembly using API

i all,

 

I would like to list out all the parts in assembly (including parts from sub assemblies) using VB API.I face problem in the following line

 

compath = (New CMpfcAssembly).CreateComponentPath(assembly, currentlevel) 
currentComponent = compath.Leaf

 

when I use this code I could not get the path of current component, it always refers to toplevel assembly.

Throw some light on this

 

1 REPLY 1
RPN
17-Peridot
17-Peridot
(To:Manjunath)

In my point of view you don't need a component path. Visit the assembly by components, if you found an assembly, call the function recursively. An couple of arrays by level including the count would help later, and for each component found, and as well a tag for already visited assemblies. As a result you may have all path information for each component feature 🙂

Announcements


Top Tags