Jump to content

annotative text/leaders


Recommended Posts

Posted (edited)

Hi all, 

I've been looking into finding a way to change annotative text multileaders from yes to no via lisp and i've had no luck. does anybody know if its possible? not sure why its so difficult. i want to be able to remove (not to delete just change from yes to no) all objects with annotative text from a drawing including nested objects.

 

(im running full version autocad 2026)

 

image.png.0aad332e6ee42f3f3e8026b25916357b.png 

Edited by masterfal
stating version
  • Like 1
Posted

appreciate the feedback guys.

 

i guess chatgpt > copilot for this sorta stuff then. spent a good hour or so going around in circles with copilot

Posted

you're welcome...I did have to go back & forth with chatgpt a few times before it finally got it right...of course it does help to know a bit about lisp to know when the lines of code provided make sense...sometimes I wonder if I'm teaching it to learn or is it training me to do better...lol

Posted
On 11/10/2026 at 10:56 AM, masterfal said:

Hi all, 

I've been looking into finding a way to change annotative text multileaders from yes to no via lisp and i've had no luck. does anybody know if its possible? not sure why its so difficult. i want to be able to remove (not to delete just change from yes to no) all objects with annotative text from a drawing including nested objects.

 

(im running full version autocad 2026)

 

image.png.0aad332e6ee42f3f3e8026b25916357b.png 

You can use AutoLISP's setpropertyvalue to change the Annotative property to No without deleting the objects.
LISP code=>(setpropertyvalue (car (entsel "\nSelect object: ")) "Annotative" 0)
 

For processing nested objects, you would also need to iterate through the block definitions and apply the same change to their entities. Xrefs cannot be modified this way without editing their source drawings.

This is a useful alternative to manually changing each object's Properties palette.

  • Like 2
Posted (edited)
8 hours ago, indiancad said:

LISP code=>(setpropertyvalue (car (entsel "\nSelect object: ")) "Annotative" 0)

To select multiple objects, use **`ssget`** instead of `entsel`, and then apply `setpropertyvalue` 
to each selected object in a loop.
Select several objects using a frame, or one at a time.
For all selected objects, the **Annotative** property will change to **No**.
The filter allows you to select:
`TEXT`, `MTEXT', `DIMENSION`, `MULTILEADER` 
**Objects are not deleted or recreated.** Only the `Annotative` property is changed.

; "Annotative" 0 /No/
(defun c:NoAnno (/ ss i) ; AI
  (if (setq ss (ssget '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER"))))
    (progn
      (setq i 0)
      (repeat (sslength ss)
        (setpropertyvalue (ssname ss i) "Annotative" 0)
        (setq i (1+ i))
      )
      (princ (strcat "\nProcessed objects: " (itoa i)))
    )
  )
  (princ)
)

 

; "Annotative" 1 /Yes/
(defun c:YesAnno (/ ss i) ; AI
  (if (setq ss (ssget '((0 . "TEXT,MTEXT,DIMENSION,MULTILEADER"))))
    (progn
      (setq i 0)
      (repeat (sslength ss)
        (setpropertyvalue (ssname ss i) "Annotative" 1)
        (setq i (1+ i))
      )
      (princ (strcat "\nProcessed objects: " (itoa i)))
    )
  )
  (princ)
)

 

Edited by Nikon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...