依据块名TBZ00,想用blockreference getattributes读出tagstring和textstring,但getattributes报错,帮忙看看
I = acaddoc.Blocks.Count
MsgBox (I)
For k = 1 To I
s = acaddoc.Blocks.Item(k - 1).Name
If UCase(s) = "TBZ00" Then
Exit For
End If
Next
Dim ent As AcadBlockReference
Dim s1 As Variant
s1 = ent.GetAttributes----出错:块或变量with未定义
For I = LBound(s1) To UBound(s1)
If UCase(s1(I).TagString) = "DRAWNO" Then
s = s1(I).TextString
End If
Next