AnsweredAssumed Answered

Select only instance 1 each part or assembly and open

Question asked by Mário Nunes on Aug 7, 2020
Latest reply on Aug 7, 2020 by Mário Nunes

I need help with this code, do what I want already, but repeat the procedure if you have several identical part/assembly.

I needed to open only instance 1 or just one part or assembly of each part. And not all the repeated part/assembly.

Help please.


"Code I have"



vchildcomp = swassy.GetComponents(False)


    For a = 0 To UBound(vchildcomp)

    Set swChildComp = vchildcomp(a)

    boolstatus = swChildComp.Select3(True, Nothing)

    'swModel.ForceRebuild3 False


  Set Part = swApp.ActiveDoc

  Set swmodel = swApp.ActiveDoc

  Set myModelView = Part.ActiveView



   swmodel.ForceRebuild3 False


   Set myModelView = Part.ActiveView

   Set swmodel = swApp.ActiveDoc


("Do what you have to do")