Sketch blocks have the following organization: SketchBlockDefinitions are like the "template" for all SketchBlockInstances. The instances are the entities that exist on the sheet, the definitions are the things that show up on the feature tree. You can get the instances in a variety of ways:
1. GetSketchBlockInstances called from each sketch and iterate over the return values
2. GetSketchBlockDefinitions from the document's SketchManager, iterate over them and then call GetInstances and iterate over those return values in a nested loop.
So, are blocks tied to annotations in any way, or is that an out of date concept?
I don't see anything like "GetAnnotation" in the ISketchBlockInstance methods. But I do see that if I do GetType on an annotation, there is the possibility of it returning swAnnotationType_e.swBlock.
This is what initially made me think that I would be able to find the blocks from iterating through the annotations.
I haven't tried that method of getting references to sketchblockinstances. If "block" is listed in that AnnotationType enumeration, I don't see why it wouldn't work.
The interface page will list several accessors for a particular object but I don't know if it is exhaustive. It probably doesn't include situations where you have to cast one type as another.
Try this to delete all Block:
Dim swApp As Object
Dim Part As ModelDoc2
Dim swDrawing As DrawingDoc
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim annArray As Variant
Dim pBlock As SldWorks.SketchBlockDefinition
Dim vBlockDef As Variant
Dim BlockIns As SketchBlockInstance
Set swApp = Application.SldWorks
Set swDrawing = swApp.ActiveDoc
Set Part = swDrawing
vBlockDef = Part.SketchManager.GetSketchBlockDefinitions
'Set swDrView = swDrawing.GetFirstView
Dim itr As Integer
Dim itr1 As Integer
For itr = 0 To UBound(vBlockDef)
Set pBlock = vBlockDef(itr)
Dim vArr As Variant
vArr = pBlock.GetInstances
If IsEmpty(vArr) = False Then
For itr1 = 0 To UBound(vArr)
Set BlockIns = vArr(itr1)
BlockIns.Select False, Nothing