ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
DSDarren Smith13/04/2024

Can anybody help?

I need to, for testing purposes, display the sketch plane that a sketch was created on and display it in a message box.

I have the following code but I cannot get it to work.

Sub GetSketchPlane()
   Set swApp = Application.SldWorks

   Set swModel = swApp.ActiveDoc

   Set swSelMgr = swModel.SelectionManager

boolstatus = swModel.Extension.SelectByID2("Sketch1", "SKETCH", 0, 0, 0, False, 0, Nothing,