3 Replies Latest reply on Dec 8, 2015 8:33 PM by 幸 柴 田

    How can I select drawing component by drawing component name

    幸 柴 田

      Hi everyone,

       

      I want to select drawing component by drawing component name that has known before hand.

       

      I tried this code .

      But it doesn't work.

      ----------------------------------------------------------------------------

        Dim swApp As SldWorks.SldWorks

        Dim Model As ModelDoc2

        Dim boolstatus As Variant

       

        Set swApp = Application.SldWorks

        Set Model = swApp.ActiveDoc

       

       

        boolstatus = Model.Extension.SelectByID2("AAAAA-1/BBBBB-1/CCCCC-1/DDDDD-1", "COMPONENT", 0, 0, 0, False, 0, Nothing, swSelectOptionDefault)

       

      ---------------------------------------------------------------------------------

      "AAAAA-1/BBBBB-1/CCCCC-1/DDDDD-1" is drawing component name I want to select.

       

      Please help me.

       

      Thanks,