Dim entObj As AcadEntity
Dim blkRefObj As AcadBlockReference
'选择图元
ThisDrawing.Utility.GetEntity entObj, pickPnt
'判断是否为块引用
If StrComp(entObj.ObjectName, "AcDbBlockReference", 1) <> 0 Then
Exit Sub
End If
'如果选择的是块引用,将其赋给块引用对象
Set blkRefObj = entObj
'判断该块引用是否含有属性值
If Not blkRefObj.HasAttributes Then
'如果不含有属性值,该怎么给这个blkRefObj添加属性
End If