Message 1 of 2
Change nested block attribute selected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, not if I could help someone.
I have a previously selected block and want to change an attribute of a block that is nested in the selected block.
Public Sub AtributosAnidados(Cadena As String, Inicio As Integer) Dim objBlk As AcadBlock Dim objBlkRef As AcadBlockReference Dim objEnt As AcadEntity Dim AttArray As Variant Dim i As Integer ThisDrawing.Utility.GetEntity objBlkRef, "Select object:" '*****I want only the selected block For Each objBlk In ThisDrawing.Blocks If objBlkRef.EffectiveName = Cadena Then i = Inicio For Each objEnt In objBlk If TypeOf objEnt Is AcadBlockReference Then If objEnt.EffectiveName = "NVavula" Then If objEnt.HasAttributes Then AttArray = objEnt.GetAttributes If AttArray(0).TagString = "NUMVALVULA" Then Debug.Print AttArray(0).TextString AttArray(0).TextString = i End If End If i = i + 1 End If End If Next End If Next Regen (acAllViewports) End Sub
thanks in advance