I think the question its self is pretty much descriptive.
What I want to do is loop through all the blocks, find all the block references, and delete them permanently one by one.
I tried to write a piece of code, but it doesn't work, when I explode the block, I still got all the attributes coming out.
Sub ClearAtt()
Dim objBlock As AcadBlockReference
Dim objEntity As AcadEntity
Dim objAttributes As AcadAttributeReference
Dim AttList As Variant
Dim I As Integer
For Each objEntity In ThisDrawing.ModelSpace
If objEntity.EntityName = "AcDbBlockReference" Then
Set objBlock = objEntity
If objBlock.HasAttributes Then
AttList = objBlock.GetAttributes
For I = LBound(AttList) To UBound(AttList)
Set objAttributes = AttList(I)
objAttributes.Erase
objBlock.Update
Next
End If
End If
Next
End Sub