Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Traversing Assembly skips copies

Status
Not open for further replies.

zuccus

Petroleum
Joined
Jun 19, 2003
Messages
137
Location
US
When traversing an assembly my program here skips copies of children. I need it to open up each child on the active config and run my special program. Any ideas on how to fix this? SW 2006 Basically the innerloop is exporting weldment body properties, so I need it to open every part file in the open assembly.


Sub TraverseComponent(swComp As SldWorks.Component2, nLevel As Long)

Dim vChildComp As Variant

Dim swChildComp As SldWorks.Component2

Dim swCompConfig As SldWorks.Configuration

Dim sPadStr As String

Dim i As Long



For i = 0 To nLevel - 1

sPadStr = sPadStr + " "

Next i

vChildComp = swComp.GetChildren

For i = 0 To UBound(vChildComp)

Set swChildComp = vChildComp(i)

TraverseComponent swChildComp, nLevel + 1

innerloop '<-Custom Program

Next i

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top