Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross 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
Jun 19, 2003
137
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