AnsweredAssumed Answered

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

Question asked by Frank Wu Frank Wu on Dec 26, 2017
Latest reply on Jan 5, 2018 by Jacob Corder

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

Outcomes