AnsweredAssumed Answered

How can I select drawing component by drawing component name

Question asked by Kouji Shibata on Dec 8, 2015
Latest reply on Dec 8, 2015 by Kouji Shibata

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,

Outcomes