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. #14
    VBAX Regular fixo's Avatar
    Joined
    Jul 2006
    Location
    Sankt-Petersburg
    Posts
    99
    Location
    Quote Originally Posted by ALe
    here test result: working perfectly!

    I changed the lisp code in order to suit to my needs (the variables "Etichetta Locale" and "Area Stanza" are given by default).

    the strange thing is that the original code works for this line
    oSset.SelectOnScreen fType, fData
    but this update doesn't work
    oSset.Select acSelectionSetAll, , , fType, fData
    and I don't understand why. But this is another issue...

    Thank you Oleg.
    You're welcome

    You have to zoom drawing to extents before selection,

    and define selection mode explicitly,

    Something like, i.e.:
    Dim oSset As AcadSelectionSet
    Set oSset = ThisDrawing.SelectionSets.Add("$Plines$")
    ZoomExtents
    Dim mode As Integer
    mode = acSelectionSetAll
    Dim vt(0 To 2) As Integer
    vt(0) = 0: vt(1) = 70: vt(2) = 410
    Dim curTab As Variant
    curTab = ThisDrawing.GetVariable("CTAB")
    oSset.Select mode, , , vt, Array("LWPOLYLINE", 1, CStr(curTab))
    MsgBox "Selected " & oSset.Count & " closed polylines"
    oSset.Delete
    Last edited by Aussiebear; 12-30-2024 at 01:42 AM.

Posting Permissions

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