masterfal Posted yesterday at 05:26 AM Posted yesterday at 05:26 AM (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) Edited yesterday at 05:28 AM by masterfal stating version 1 Quote
Paul Li Posted yesterday at 06:25 AM Posted yesterday at 06:25 AM Straight out of ChatGPT providing both No & Yes versions MldAnoY.lsp MldAnoN.lsp 1 Quote
SLW210 Posted yesterday at 12:59 PM Posted yesterday at 12:59 PM I didn't test @Paul Li's codes, but there is... Annotative text conversion - AutoLISP, Visual LISP & DCL - AutoCAD Forums Quote
masterfal Posted 13 hours ago Author Posted 13 hours ago 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 Quote
Paul Li Posted 11 hours ago Posted 11 hours ago 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 Quote
indiancad Posted 8 hours ago Posted 8 hours ago 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) 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. 2 Quote
SLW210 Posted 2 hours ago Posted 2 hours ago What was wrong with @alanjt's code in the link I posted? Quote
Nikon Posted 52 minutes ago Posted 52 minutes ago (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 1 minute ago by Nikon Quote
Recommended Posts
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.