I feel like this should be a simple question but its baffled me all afternoon. I want to check to see if a sketch is currently being edited so I can prevent a macro from running if this is the case. How would I find this out?
Dim swSketch As SldWorks.SketchSet swSketch = Application.SldWorks.ActiveDoc.SketchManager.ActiveSketchIf swSketch Is Nothing Then MsgBox "No sketch active"Else MsgBox "Active sketch: " & swSketch.NameEnd IfEnd Sub
Perfect, thank you. "if Var is Nothing" is exactly what I never knew I needed.
Retrieving data ...