4 Replies Latest reply on Sep 9, 2015 12:44 AM by roberto gennari

    GetComponents is the best way for get an Array of Components?

    roberto gennari


      I use GetComponets to retrieve the array of components in an assembly, and then make use that I need, but overall it is very very slow:

      This is my code in Visual Basic 2010, in stand alone metod


      swApp = CreateObject("SldWorks.Application")


      swModel = swApp.ActiveDoc


      Part = swModel


      Dim i As Integer


      comps = Part.GetComponents(False)

      For i = 0 To UBound(comps)

      comp = comps(i)

         If comp.IsRoot Then 




        End If



      Is there a faster way to get my array of components?



      Thank you