Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Text, Dimension and Attibute Editing

8 REPLIES 8
Reply
Message 1 of 9
hernandito
367 Views, 8 Replies

Text, Dimension and Attibute Editing

Hi Guys,

In the old Autocad days there was a Lisp routine that with a single command, you could pick either a text, mtext, attribute block, or dimension line and you could easily edit the text in any of these items. This utility is a little obsolete in that it edits the dimension text using its own routine, rather that the more updated version DDEDIT command. Does anyone know if a more current version of this routine exists? I can upload the old Lisp if anyone is interested.

Many thanks,
Hernando
8 REPLIES 8
Message 2 of 9
C O Jones
in reply to: hernandito

This is one I found that works for me

; TIP1011.LSP: ME.LSP Multiple Editing (c)1994, Gary Goode
;;;modified 4.9.2003 to include mtext, dimensions, attdef and arctext
;This program will let you pick and edit multi text and attributes
;by window, pick or crossing using dialog boxes.
;-----------------------------------------------------------------
(defun C:ME (/ A B C D E F G H J K L M N P R)
(graphscr)
(setvar "CMDECHO" 0)
(setvar "HIGHLIGHT" 1)
(prompt "\nMulti-Edit is loaded ... ")
(setq A (ssget) B (sslength A) C 0)
(while (< C B) (setq D (ssname A C) E (entget D))
(setq F (car E))
(setq G (cdr E))
(setq H (car G))
(setq J (cdr H))
(setq K "TEXT")
(setq L "INSERT")
(setq M "DIMENSION")
(setq N "MTEXT")
(setq P "ATTDEF")
(setq R "ARCALIGNEDTEXT")
(if (= J K)(command ".ddedit" D ""))
(if (= J L)(command ".attedit" D ))
(if (= J N)(command ".MTEDIT" D ""))
(if (= J M)(command ".ddedit" D ""))
(if (= J P)(command ".ddedit" D ""))
(if (= J R)(command ".ARCTEXT" D ""))
(setq C (1+ C)))
(princ)
); end me.lsp
Message 3 of 9
hernandito
in reply to: hernandito

Very nice, thank you! Unfortunately, I cannot get it to work with Attribute block text edits. When I select an attribute block and hit enter, it says "invalid". The command to edit this is DDATTE. I changed the ATTDEF text below to DDATTE and it still didn't work.

I know very little about Lisp and I am hoping this is a very easy thing to solve....

Thanks a million for your help!
Message 4 of 9
C O Jones
in reply to: hernandito

I changed the attedit to ddatte and it works. This makes no sense to me as ddatte was retired as a command a while back and is aliased to attedit.

; TIP1011.LSP: ME.LSP Multiple Editing (c)1994, Gary Goode
;;;modified 4.9.2003 to include mtext, dimensions, attdef and arctext
;This program will let you pick and edit multi text and attributes
;by window, pick or crossing using dialog boxes.
;-----------------------------------------------------------------
(defun C:ME (/ ) ;A B C D E F G H J K L M N P R)
(graphscr)
(setvar "CMDECHO" 0)
(setvar "HIGHLIGHT" 1)
(prompt "\nMulti-Edit is loaded ... ")
(setq A (ssget) B (sslength A) C 0)
(while (< C B) (setq D (ssname A C) E (entget D))
(setq F (car E))
(setq G (cdr E))
(setq H (car G))
(setq J (cdr H))
(setq K "TEXT")
(setq L "INSERT")
(setq M "DIMENSION")
(setq N "MTEXT")
(setq P "ATTDEF")
(setq R "ARCALIGNEDTEXT")
(if (= J K)(command ".ddedit" D ""))
(if (= J L)(command "ddatte" D))
(if (= J N)(command ".MTEDIT" D ""))
(if (= J M)(command ".ddedit" D ""))
(if (= J P)(command ".ddedit" D ""))
(if (= J R)(command ".ARCTEXT" D ""))
(setq C (1+ C)))
(princ)
); end me.lsp
Message 5 of 9
hernandito
in reply to: hernandito

This works like a charm. Thank you very much!

I am upgrading from an old version of Architectural Desktop to the latest version. I have been struggling with the menus and CUI, which are new to me. I think I am getting to a place where I can be productive. The whole CUI thing threw me for a loop but I am now getting a handle.

Thank you for all your help; I really appreciate it.
Message 6 of 9
C O Jones
in reply to: hernandito

you are welcome and please change this one line

(defun C:ME (/ ) ;A B C D E F G H J K L M N P R)

to look like the following. Note the difference after the / to A

(defun C:ME (/ A B C D E F G H J K L M N P R)

I had remarked out for trouble shooting and forgot to take the semicolon and extra paraenthesis.
Message 7 of 9
omorah
in reply to: C O Jones

Hello, it's been quite a long time now with this post, but just have to give it a try.

 

For the life of me, I can't get this LISP to work.  Sure I had used it up to about a month ago.

I currently use AutoCAD 2015 (Vanilla).   I have tried replacing the file and changing all the you

asked to change in your post, still it says "Unknown command "DDEDIT".

 

Thanks.

Message 8 of 9
hmsilva
in reply to: omorah

Hi omorah,

 

DDEDIT was discontinued with the 2015 release, change it to TEXTEDIT

 

Hope this helps,
Henrique

EESignature

Message 9 of 9
omorah
in reply to: omorah

Hello again,  just found the answer.  On another post, someone mentioned "DDEDIT" was replaced with "TEXTEDIT" in 2015.

I have used it in 2015 ever since.  Maybe an update changed it for me.  So, I replaced the "DDEDIT" to "TEXTEDIT".  Now it is working.

Thanks anyway.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost