I have a need to get the Name and ComponentReference of all parts in a rather large assembly.
Dim partsList As Object() = swModel.GetComponents(False)
For Each activeComp In partsList
activePart = New CustomPartClass
activePart.PN = activeComp.Name2
activePart.refdes = activeComp.ComponentReference
This works, but is REALLY slow. For some of my assemblies, this takes 30 seconds or more. I inserted some telemetry and the GetComponents call alone is about half the time and then the Name2 and ComponentReference calls take up the other half.
Is there a faster way to do this?