3 Replies Latest reply on Jan 5, 2018 9:49 AM by Jacob Corder

    I want to draw a Circle by running the "Circle" command via the "RunCommand" function,  Then select this circle immediately.

    Frank Wu Frank Wu

      Hello,all!

      I want to draw a Circle by running the "Circle" command via the "RunCommand" function,

      Then select this circle immediately . Does anyone know how to achieve it?

       

      vb.net code:

       

      Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

       

              Dim swModel As ModelDoc2

              Dim boolstatus As Boolean

              swApp = GetObject(, "SldWorks.Application")

              swModel = swApp.ActiveDoc

       

              'Open SOLIDWORKS Circle PropertyManager page

              'Title of page is My Circle

              boolstatus = swApp.RunCommand(swCommands_e.swCommands_Circle, "My Circle")

       

          End Sub