Private Sub SetAtt() Dim obj As AcadBlockReference Dim varAttributes As Variant
Set obj = ......
varAttributes = obj.GetAttributes Dim strAttributes As String Dim i As Integer For i = LBound(varAttributes) To UBound(varAttributes) If UCase(varAttributes(i).TagString) = "模块代号01" Then varAttributes(i).TextString ="A"
If UCase(varAttributes(i).TagString) = "模块代号02" Then varAttributes(i).TextString = "B" If UCase(varAttributes(i).TagString) = "模块代号03" Then varAttributes(i).TextString = "C"
next i
end sub |