Community
My drawing has blocks nested into blacks nested into blacks nested into blacks and so on, and every block may or may not have attributes, how can I change all the attributes color? Any help please?
Here it is what you want:
Public Sub block_nest() Dim objBlock As AcadBlockReference Dim objBlock_objEnt As AcadBlockReference Dim objBlk As AcadBlock Dim objBlkRef As AcadBlockReference Dim objEnt As AcadEntity Dim var_atts As Variant For Each objBlk In ThisDrawing.Blocks For Each objEnt In objBlk If TypeOf objEnt Is AcadBlockReference Then Set objBlock_objEnt = objEnt var_atts = objBlock_objEnt.GetAttributes For j = 0 To UBound(var_atts) var_atts(j).color = acRed Next End If Next Next End Sub