Hey Guys,
I can't get this to give me the text style (like "Standard" or "Architectural")...what am I doing wrong?
[vba]
Sub Block_Attrib_TextStyle()
On Error Resume Next
Dim objBRef As AcadBlockReference
Dim varAttribs As Variant
Dim intI As Integer
For Each objBRef In ThisDrawing.ActiveSelectionSet
If objBRef.HasAttributes And Not objBRef Is Nothing Then
varAttribs = objBRef.GetAttributes
For intI = LBound(varAttribs) To UBound(varAttribs)
Debug.Print varAttribs(intI).Layer
Debug.Print varAttribs(intI).TextStyle
Next intI
End If
Next objBRef
End Sub
[/vba]
Also, I only select the blocks with attributes BEFORE I run the code...I'm not sure how to get it to work if I select a bunch of stuff (blocks, lines, circles, etc) then run the code... If I do with this code above, it won't even find the blocks with attributes.
TIA