- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a drawing with hundreds of blocks with the same attribute names and I would like to change the height of these attributes in all blocks globally.
The code attached on the screen changes the height, but when I edit a block it returns to the previous height.
Sub ChangeHeightAttr()
Dim nombreSeleccion As String
Dim Seleccion As AcadSelectionSet
Dim ListaAtr As Variant
Dim item As Variant
Dim i As Variant
Set Seleccion = ThisDrawing.SelectionSets.Add("Sleccion1")
Seleccion.SelectOnScreen
For Each item In Seleccion
If item.HasAttributes Then
ListaAtr = item.GetAttributes()
For i = LBound(ListaAtr) To UBound(ListaAtr)
ListaAtr(i).Height = 5
ListaAtr(i).Update
Next
End If
Next
End sub
Thank you very much in advance
Best regards
Solved! Go to Solution.