Option Explicit
Dim swApp As SldWorks.SldWorks
Dim swModel As ModelDoc2
Dim sketch As sketch
Dim feature As feature
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
swModel.SketchManager.InsertSketch True
Set sketch = swModel.SketchManager.ActiveSketch
Set feature = sketch
MsgBox feature.Name
End Sub
' i want to get the name of active sketch/ feature;
SolidworksApi/macros