Message 1 of 4
Checking to see if a sketch is in edit mode?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need to be able to delete a sketch in my .idw file. The snippet below works perfectly if the sketch is not in "edit mode" but it crashes if it is in edit mode. I can place "oSketch.exitedit" in the loop but that causes it to crash if it is not in edit mode.
Any suggestions on how to check to see if a sketch is in edit mode?
Dim oSketch As DrawingSketch = Nothing
Dim oSketches As DrawingSketches = oDrawingView.Sketches
For Each oSketch In oSketches
If oSketch.Name = "skSubPanelSketch" Then
oSketch.Delete()
Exit For
End If
Next