Results 1 to 20 of 21

Thread: Solved: Read field in AUTOCAD block attribute

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    I did do ZoomExtents. this is original code (sound it familiar to you? )
        Dim fType(1) As Integer
        Dim fData(1) As Variant
    fType(0) = 0: fType(1) = 2
    fData(0) = "INSERT": fData(1) = "Etichetta Locale" '' <-- change blockname here
    For Each oSset In ThisDrawing.SelectionSets
        If oSset.Name = "$Blocks$" Then
            oSset.Delete
            Exit For
        End If
        Next oSset
        Set oSset = ThisDrawing.SelectionSets.Add("$Blocks$") '' <-- any name is admissible
        On Error GoTo 0
    oSset.SelectOnScreen fType, fData
    I Added the following lines instead of the last original sentence
        Application.ZoomExtents
        oSset.Select acSelectionSetAll, , , fType, fData
    The selection gets the blocks but in such a way that is different from the original code...
    Last edited by Aussiebear; 12-30-2024 at 01:43 AM.
    ALe
    Help indigent families: www.bancomadreteresa.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •