Selecting motor in motion study

I want to select motor in motion study but the recorde Macro return back nothing the program is As follow:

Please let me know if there is solution

Thanks in advance.

Set Part = swApp.ActiveDoc

Dim myModelView As Object

Set myModelView = Part.ActiveView

   myModelView.FrameState = swWindowState_e.swWindowMaximized

  boolstatus = Part.Extension.SelectByID2("LinearMotor1", "SIMULATION_ELEMENT", 0, 0, 0, False, 0, Nothing, 0)

SolidworksApi macros
Answers 2
AT
AT 2012-11-01 Best Answer

I found that the feature actually selected but not updated in the Feature Tree. The trick with reactivating of the tab fixes the issue. Refer attached macro.

______________________

Regards,

Artem Taturevych

Application Engineer at Intercad

http://intercad.com.au/

Tel: +61 2 9454 4444

SF
SF 2012-11-02

Thank you. you are helpfull and greate.