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

Edit All Text Types Lisp F1

17 REPLIES 17
Reply
Message 1 of 18
akdrafter
300 Views, 17 Replies

Edit All Text Types Lisp F1

Hello,

I found the lisp file pasted below this message a long time ago and like using it over the double click to edit and the new 2002 enhanced edit. All I want to do is select any text type (text, mtext, dimension text, attdef & inserts with att's) and then run the appropriate text edit command on it.

To edit text, mtext, dimension tex & attdef's = .ddedit

To edit inserts w/att's = .ddatte

The routine works fine except that if I select an object and it uses the .ddedit I can not select an object that uses .ddatte unless I end the routine and restart it. I remember this being able to pick both type within one session of the lisp, but it does not work in 2002.

Any ideas why? Better way of doing this...via lisp?

Thanks in advance.

"Catch" Ya Later,
AKDRAFTER


;;; ET by David Harrington and Scott Gauthier
;;; Edit any text type object
;;;
;;; Main Program
;;;
(defun C:ED (/ ent ent_typ olosmode olcmdecho et_error old_error)
(defun et_error (msg)
(if (or (= msg "Function cancelled") (/= msg "quit / exit abort"))
(princ (strcat "Error: " msg))
)
(setvar "CMDECHO" olcmdecho)
(setvar "OSMODE" olosmode)
(setq *error* old_err
old_err nil
et_error nil
)
(princ)
)
(setq old_err *error*
*error* et_error
)
(princ "\n ET - Edit Textural Object")
(setq olosmode (getvar "OSMODE")
olcmdecho (getvar "CMDECHO")
)
(setvar "cmdecho" 0)
(setvar "osmode" 0)
(while (not (setq ent (entsel "\nSelect text object: ")))
(princ "\nNothing Selected... \nPick Again..")
)
(cond
( (or
(= (setq ent_typ (cdr (assoc 0 (entget (CAR ent))))) "TEXT")
(= ent_typ "MTEXT")
(= ent_typ "DIMENSION")
(= ent_typ "ATTDEF")
)
(command ".ddedit" (CAR ent))
)
((= ent_typ "INSERT")
(command ".ddatte" (CAR Ent))
)
)
(setvar "OSMODE" olosmode)
(setvar "CMDECHO" olcmdecho)
(setq *error* old_err)
(princ)
)
(princ)
;
17 REPLIES 17
Message 2 of 18
Anonymous
in reply to: akdrafter

akdrafter, I think this is what you want. I also think the logic so fouled up, I'm almost embaressed to post it. It should work continuously until the user hits Enter. It should allow editing of any type of text using the appropriate dialog. It should catch missed picks or wrong object types and continue. Joe Burke ; JB 3/11/2004 (defun c:ED ( / *Error* typlst ename typ ) (defun *Error* (Msg) (cond ((or (not Msg) (member Msg '("console break" "Function cancelled" "quit / exit abort")))) ((princ (strcat "\nError: " Msg))) ) ;cond (setvar "cmdecho" 1) (princ) ) ;end error (setq typlst '("TEXT" "MTEXT" "DIMENSION" "ATTDEF" "INSERT")) (setvar "errno" 0) (setvar "cmdecho" 0) (while (/= 52 (getvar "errno")) (if (and (setq ename (car (entsel "\nSelect object or Enter to end: "))) (member (cdr (assoc 0 (entget ename))) typlst) ) (progn (setq typ (cdr (assoc 0 (entget ename)))) (if (= "INSERT" typ) (command ".ddatte" ename (command)) (command ".ddedit" ename (command)) ) (setvar "errno" 0) ) (progn (if (/= 52 (getvar "errno")) (princ "\nMissed pick or wrong object type: ") ) ) ) ;if ) ;while (if (= 52 (getvar "errno")) (exit) (c:ED) ) (*Error* nil) (princ) ) ;end "akdrafter" wrote in message news:19496099.1078961506063.JavaMail.jive@jiveforum2.autodesk.com... > Hello, > > I found the lisp file pasted below this message a long time ago and like using it over the double click to edit and the new 2002 enhanced edit. All I want to do is select any text type (text, mtext, dimension text, attdef & inserts with att's) and then run the appropriate text edit command on it. > > To edit text, mtext, dimension tex & attdef's = .ddedit > > To edit inserts w/att's = .ddatte > > The routine works fine except that if I select an object and it uses the .ddedit I can not select an object that uses .ddatte unless I end the routine and restart it. I remember this being able to pick both type within one session of the lisp, but it does not work in 2002. > > Any ideas why? Better way of doing this...via lisp? > > Thanks in advance. > > "Catch" Ya Later, > AKDRAFTER > > > ;;; ET by David Harrington and Scott Gauthier > ;;; Edit any text type object > ;;; > ;;; Main Program > ;;; > (defun C:ED (/ ent ent_typ olosmode olcmdecho et_error old_error) > (defun et_error (msg) > (if (or (= msg "Function cancelled") (/= msg "quit / exit abort")) > (princ (strcat "Error: " msg)) > ) > (setvar "CMDECHO" olcmdecho) > (setvar "OSMODE" olosmode) > (setq *error* old_err > old_err nil > et_error nil > ) > (princ) > ) > (setq old_err *error* > *error* et_error > ) > (princ "\n ET - Edit Textural Object") > (setq olosmode (getvar "OSMODE") > olcmdecho (getvar "CMDECHO") > ) > (setvar "cmdecho" 0) > (setvar "osmode" 0) > (while (not (setq ent (entsel "\nSelect text object: "))) > (princ "\nNothing Selected... \nPick Again..") > ) > (cond > ( (or > (= (setq ent_typ (cdr (assoc 0 (entget (CAR ent))))) "TEXT") > (= ent_typ "MTEXT") > (= ent_typ "DIMENSION") > (= ent_typ "ATTDEF") > ) > (command ".ddedit" (CAR ent)) > ) > ((= ent_typ "INSERT") > (command ".ddatte" (CAR Ent)) > ) > ) > (setvar "OSMODE" olosmode) > (setvar "CMDECHO" olcmdecho) > (setq *error* old_err) > (princ) > ) > (princ) > ;
Message 3 of 18
Anonymous
in reply to: akdrafter

No ARCALIGNTEXT? I know it's not straight AutoCAD. "Joe Burke" wrote in message news:40506266_1@newsprd01... > akdrafter, > > I think this is what you want. I also think the logic so fouled up, I'm almost > embaressed to post it. > > It should work continuously until the user hits Enter. It should allow editing of any > type of text using the appropriate dialog. It should catch missed picks or wrong > object types and continue. > > Joe Burke > > ; JB 3/11/2004 > (defun c:ED ( / *Error* typlst ename typ ) > (defun *Error* (Msg) > (cond > ((or (not Msg) > (member Msg '("console break" > "Function cancelled" > "quit / exit abort")))) > ((princ (strcat "\nError: " Msg))) > ) ;cond > (setvar "cmdecho" 1) > (princ) > ) ;end error > > (setq typlst '("TEXT" "MTEXT" "DIMENSION" "ATTDEF" "INSERT")) > (setvar "errno" 0) > (setvar "cmdecho" 0) > (while (/= 52 (getvar "errno")) > (if > (and > (setq ename (car (entsel "\nSelect object or Enter to end: "))) > (member (cdr (assoc 0 (entget ename))) typlst) > ) > (progn > (setq typ (cdr (assoc 0 (entget ename)))) > (if (= "INSERT" typ) > (command ".ddatte" ename (command)) > (command ".ddedit" ename (command)) > ) > (setvar "errno" 0) > ) > (progn > (if (/= 52 (getvar "errno")) > (princ "\nMissed pick or wrong object type: ") > ) > ) > ) ;if > ) ;while > (if (= 52 (getvar "errno")) > (exit) > (c:ED) > ) > (*Error* nil) > (princ) > ) ;end > > "akdrafter" wrote in message > news:19496099.1078961506063.JavaMail.jive@jiveforum2.autodesk.com... > > Hello, > > > > I found the lisp file pasted below this message a long time ago and like using it > over the double click to edit and the new 2002 enhanced edit. All I want to do is > select any text type (text, mtext, dimension text, attdef & inserts with att's) and > then run the appropriate text edit command on it. > > > > To edit text, mtext, dimension tex & attdef's = .ddedit > > > > To edit inserts w/att's = .ddatte > > > > The routine works fine except that if I select an object and it uses the .ddedit I > can not select an object that uses .ddatte unless I end the routine and restart it. I > remember this being able to pick both type within one session of the lisp, but it > does not work in 2002. > > > > Any ideas why? Better way of doing this...via lisp? > > > > Thanks in advance. > > > > "Catch" Ya Later, > > AKDRAFTER > > > > > > ;;; ET by David Harrington and Scott Gauthier > > ;;; Edit any text type object > > ;;; > > ;;; Main Program > > ;;; > > (defun C:ED (/ ent ent_typ olosmode olcmdecho et_error old_error) > > (defun et_error (msg) > > (if (or (= msg "Function cancelled") (/= msg "quit / exit abort")) > > (princ (strcat "Error: " msg)) > > ) > > (setvar "CMDECHO" olcmdecho) > > (setvar "OSMODE" olosmode) > > (setq *error* old_err > > old_err nil > > et_error nil > > ) > > (princ) > > ) > > (setq old_err *error* > > *error* et_error > > ) > > (princ "\n ET - Edit Textural Object") > > (setq olosmode (getvar "OSMODE") > > olcmdecho (getvar "CMDECHO") > > ) > > (setvar "cmdecho" 0) > > (setvar "osmode" 0) > > (while (not (setq ent (entsel "\nSelect text object: "))) > > (princ "\nNothing Selected... \nPick Again..") > > ) > > (cond > > ( (or > > (= (setq ent_typ (cdr (assoc 0 (entget (CAR ent))))) "TEXT") > > (= ent_typ "MTEXT") > > (= ent_typ "DIMENSION") > > (= ent_typ "ATTDEF") > > ) > > (command ".ddedit" (CAR ent)) > > ) > > ((= ent_typ "INSERT") > > (command ".ddatte" (CAR Ent)) > > ) > > ) > > (setvar "OSMODE" olosmode) > > (setvar "CMDECHO" olcmdecho) > > (setq *error* old_err) > > (princ) > > ) > > (princ) > > ; > >
Message 4 of 18
Anonymous
in reply to: akdrafter

Warren, Do you have a point here... or are you just tossing spitballs? I'm using A2k2. Joe Burke "Warren Trost" wrote in message news:40506675$1_2@newsprd01... > No ARCALIGNTEXT? > > I know it's not straight AutoCAD. > > "Joe Burke" wrote in message > news:40506266_1@newsprd01... > > akdrafter, > > > > I think this is what you want. I also think the logic so fouled up, I'm > almost > > embaressed to post it. > > > > It should work continuously until the user hits Enter. It should allow > editing of any > > type of text using the appropriate dialog. It should catch missed picks or > wrong > > object types and continue. > > > > Joe Burke > > > > ; JB 3/11/2004 > > (defun c:ED ( / *Error* typlst ename typ ) > > (defun *Error* (Msg) > > (cond > > ((or (not Msg) > > (member Msg '("console break" > > "Function cancelled" > > "quit / exit abort")))) > > ((princ (strcat "\nError: " Msg))) > > ) ;cond > > (setvar "cmdecho" 1) > > (princ) > > ) ;end error > > > > (setq typlst '("TEXT" "MTEXT" "DIMENSION" "ATTDEF" "INSERT")) > > (setvar "errno" 0) > > (setvar "cmdecho" 0) > > (while (/= 52 (getvar "errno")) > > (if > > (and > > (setq ename (car (entsel "\nSelect object or Enter to end: "))) > > (member (cdr (assoc 0 (entget ename))) typlst) > > ) > > (progn > > (setq typ (cdr (assoc 0 (entget ename)))) > > (if (= "INSERT" typ) > > (command ".ddatte" ename (command)) > > (command ".ddedit" ename (command)) > > ) > > (setvar "errno" 0) > > ) > > (progn > > (if (/= 52 (getvar "errno")) > > (princ "\nMissed pick or wrong object type: ") > > ) > > ) > > ) ;if > > ) ;while > > (if (= 52 (getvar "errno")) > > (exit) > > (c:ED) > > ) > > (*Error* nil) > > (princ) > > ) ;end > > > > "akdrafter" wrote in message > > news:19496099.1078961506063.JavaMail.jive@jiveforum2.autodesk.com... > > > Hello, > > > > > > I found the lisp file pasted below this message a long time ago and like > using it > > over the double click to edit and the new 2002 enhanced edit. All I want > to do is > > select any text type (text, mtext, dimension text, attdef & inserts with > att's) and > > then run the appropriate text edit command on it. > > > > > > To edit text, mtext, dimension tex & attdef's = .ddedit > > > > > > To edit inserts w/att's = .ddatte > > > > > > The routine works fine except that if I select an object and it uses the > .ddedit I > > can not select an object that uses .ddatte unless I end the routine and > restart it. I > > remember this being able to pick both type within one session of the lisp, > but it > > does not work in 2002. > > > > > > Any ideas why? Better way of doing this...via lisp? > > > > > > Thanks in advance. > > > > > > "Catch" Ya Later, > > > AKDRAFTER > > > > > > > > > ;;; ET by David Harrington and Scott Gauthier > > > ;;; Edit any text type object > > > ;;; > > > ;;; Main Program > > > ;;; > > > (defun C:ED (/ ent ent_typ olosmode olcmdecho et_error old_error) > > > (defun et_error (msg) > > > (if (or (= msg "Function cancelled") (/= msg "quit / exit abort")) > > > (princ (strcat "Error: " msg)) > > > ) > > > (setvar "CMDECHO" olcmdecho) > > > (setvar "OSMODE" olosmode) > > > (setq *error* old_err > > > old_err nil > > > et_error nil > > > ) > > > (princ) > > > ) > > > (setq old_err *error* > > > *error* et_error > > > ) > > > (princ "\n ET - Edit Textural Object") > > > (setq olosmode (getvar "OSMODE") > > > olcmdecho (getvar "CMDECHO") > > > ) > > > (setvar "cmdecho" 0) > > > (setvar "osmode" 0) > > > (while (not (setq ent (entsel "\nSelect text object: "))) > > > (princ "\nNothing Selected... \nPick Again..") > > > ) > > > (cond > > > ( (or > > > (= (setq ent_typ (cdr (assoc 0 (entget (CAR ent))))) "TEXT") > > > (= ent_typ "MTEXT") > > > (= ent_typ "DIMENSION") > > > (= ent_typ "ATTDEF") > > > ) > > > (command ".ddedit" (CAR ent)) > > > ) > > > ((= ent_typ "INSERT") > > > (command ".ddatte" (CAR Ent)) > > > ) > > > ) > > > (setvar "OSMODE" olosmode) > > > (setvar "CMDECHO" olcmdecho) > > > (setq *error* old_err) > > > (princ) > > > ) > > > (princ) > > > ; > > > > > >
Message 5 of 18
Anonymous
in reply to: akdrafter

Just a simple question about editing anything per the original comment in the ED routine stating editing anything. No sarcasm or criticism intended. "Joe Burke" wrote in message news:40506af1$1_1@newsprd01... > Warren, > > Do you have a point here... or are you just tossing spitballs? > > I'm using A2k2. > > Joe Burke > > "Warren Trost" wrote in message > news:40506675$1_2@newsprd01... > > No ARCALIGNTEXT? > > > > I know it's not straight AutoCAD. > > > > "Joe Burke" wrote in message > > news:40506266_1@newsprd01... > > > akdrafter, > > > > > > I think this is what you want. I also think the logic so fouled up, I'm > > almost > > > embaressed to post it. > > > > > > It should work continuously until the user hits Enter. It should allow > > editing of any > > > type of text using the appropriate dialog. It should catch missed picks or > > wrong > > > object types and continue. > > > > > > Joe Burke > > > > > > ; JB 3/11/2004 > > > (defun c:ED ( / *Error* typlst ename typ ) > > > (defun *Error* (Msg) > > > (cond > > > ((or (not Msg) > > > (member Msg '("console break" > > > "Function cancelled" > > > "quit / exit abort")))) > > > ((princ (strcat "\nError: " Msg))) > > > ) ;cond > > > (setvar "cmdecho" 1) > > > (princ) > > > ) ;end error > > > > > > (setq typlst '("TEXT" "MTEXT" "DIMENSION" "ATTDEF" "INSERT")) > > > (setvar "errno" 0) > > > (setvar "cmdecho" 0) > > > (while (/= 52 (getvar "errno")) > > > (if > > > (and > > > (setq ename (car (entsel "\nSelect object or Enter to end: "))) > > > (member (cdr (assoc 0 (entget ename))) typlst) > > > ) > > > (progn > > > (setq typ (cdr (assoc 0 (entget ename)))) > > > (if (= "INSERT" typ) > > > (command ".ddatte" ename (command)) > > > (command ".ddedit" ename (command)) > > > ) > > > (setvar "errno" 0) > > > ) > > > (progn > > > (if (/= 52 (getvar "errno")) > > > (princ "\nMissed pick or wrong object type: ") > > > ) > > > ) > > > ) ;if > > > ) ;while > > > (if (= 52 (getvar "errno")) > > > (exit) > > > (c:ED) > > > ) > > > (*Error* nil) > > > (princ) > > > ) ;end > > > > > > "akdrafter" wrote in message > > > news:19496099.1078961506063.JavaMail.jive@jiveforum2.autodesk.com... > > > > Hello, > > > > > > > > I found the lisp file pasted below this message a long time ago and like > > using it > > > over the double click to edit and the new 2002 enhanced edit. All I want > > to do is > > > select any text type (text, mtext, dimension text, attdef & inserts with > > att's) and > > > then run the appropriate text edit command on it. > > > > > > > > To edit text, mtext, dimension tex & attdef's = .ddedit > > > > > > > > To edit inserts w/att's = .ddatte > > > > > > > > The routine works fine except that if I select an object and it uses the > > .ddedit I > > > can not select an object that uses .ddatte unless I end the routine and > > restart it. I > > > remember this being able to pick both type within one session of the lisp, > > but it > > > does not work in 2002. > > > > > > > > Any ideas why? Better way of doing this...via lisp? > > > > > > > > Thanks in advance. > > > > > > > > "Catch" Ya Later, > > > > AKDRAFTER > > > > > > > > > > > > ;;; ET by David Harrington and Scott Gauthier > > > > ;;; Edit any text type object > > > > ;;; > > > > ;;; Main Program > > > > ;;; > > > > (defun C:ED (/ ent ent_typ olosmode olcmdecho et_error old_error) > > > > (defun et_error (msg) > > > > (if (or (= msg "Function cancelled") (/= msg "quit / exit abort")) > > > > (princ (strcat "Error: " msg)) > > > > ) > > > > (setvar "CMDECHO" olcmdecho) > > > > (setvar "OSMODE" olosmode) > > > > (setq *error* old_err > > > > old_err nil > > > > et_error nil > > > > ) > > > > (princ) > > > > ) > > > > (setq old_err *error* > > > > *error* et_error > > > > ) > > > > (princ "\n ET - Edit Textural Object") > > > > (setq olosmode (getvar "OSMODE") > > > > olcmdecho (getvar "CMDECHO") > > > > ) > > > > (setvar "cmdecho" 0) > > > > (setvar "osmode" 0) > > > > (while (not (setq ent (entsel "\nSelect text object: "))) > > > > (princ "\nNothing Selected... \nPick Again..") > > > > ) > > > > (cond > > > > ( (or > > > > (= (setq ent_typ (cdr (assoc 0 (entget (CAR ent))))) "TEXT") > > > > (= ent_typ "MTEXT") > > > > (= ent_typ "DIMENSION") > > > > (= ent_typ "ATTDEF") > > > > ) > > > > (command ".ddedit" (CAR ent)) > > > > ) > > > > ((= ent_typ "INSERT") > > > > (command ".ddatte" (CAR Ent)) > > > > ) > > > > ) > > > > (setvar "OSMODE" olosmode) > > > > (setvar "CMDECHO" olcmdecho) > > > > (setq *error* old_err) > > > > (princ) > > > > ) > > > > (princ) > > > > ; > > > > > > > > > > > >
Message 6 of 18
akdrafter
in reply to: akdrafter

Warren,

For my particular use of this routine. I do not use arcaligntext.

Thanks for the help Joe.

"Catch" Ya Later,
AKDRAFTER
Message 7 of 18
Anonymous
in reply to: akdrafter

Warren, Sorry, you caught me in a bad mood. My apologies. It crossed my mind. As far as I know Express Tools is required for editing ArcText prior to A2k4. So there didn't seem much point including support and error checking for something akdrafter might not have. And it wasn't mentioned in the original message. I haven't installed A2k4 yet, so I don't know what the command is or how the editor works. Now that it is included (assuming it is), I agree the program should support it. Regards Joe Burke "Warren Trost" wrote in message news:4051b870_1@newsprd01... > Just a simple question about editing anything per the original comment in > the ED routine stating editing anything. No sarcasm or criticism intended. > > > "Joe Burke" wrote in message > news:40506af1$1_1@newsprd01... > > Warren, > > > > Do you have a point here... or are you just tossing spitballs? > > > > I'm using A2k2. > > > > Joe Burke > > > > "Warren Trost" wrote in message > > news:40506675$1_2@newsprd01... > > > No ARCALIGNTEXT? > > > > > > I know it's not straight AutoCAD. > > > > > > "Joe Burke" wrote in message > > > news:40506266_1@newsprd01... > > > > akdrafter, > > > > > > > > I think this is what you want. I also think the logic so fouled up, > I'm > > > almost > > > > embaressed to post it. > > > > > > > > It should work continuously until the user hits Enter. It should allow > > > editing of any > > > > type of text using the appropriate dialog. It should catch missed > picks or > > > wrong > > > > object types and continue. > > > > > > > > Joe Burke > > > > > > > > ; JB 3/11/2004 > > > > (defun c:ED ( / *Error* typlst ename typ ) > > > > (defun *Error* (Msg) > > > > (cond > > > > ((or (not Msg) > > > > (member Msg '("console break" > > > > "Function cancelled" > > > > "quit / exit abort")))) > > > > ((princ (strcat "\nError: " Msg))) > > > > ) ;cond > > > > (setvar "cmdecho" 1) > > > > (princ) > > > > ) ;end error > > > > > > > > (setq typlst '("TEXT" "MTEXT" "DIMENSION" "ATTDEF" "INSERT")) > > > > (setvar "errno" 0) > > > > (setvar "cmdecho" 0) > > > > (while (/= 52 (getvar "errno")) > > > > (if > > > > (and > > > > (setq ename (car (entsel "\nSelect object or Enter to end: > "))) > > > > (member (cdr (assoc 0 (entget ename))) typlst) > > > > ) > > > > (progn > > > > (setq typ (cdr (assoc 0 (entget ename)))) > > > > (if (= "INSERT" typ) > > > > (command ".ddatte" ename (command)) > > > > (command ".ddedit" ename (command)) > > > > ) > > > > (setvar "errno" 0) > > > > ) > > > > (progn > > > > (if (/= 52 (getvar "errno")) > > > > (princ "\nMissed pick or wrong object type: ") > > > > ) > > > > ) > > > > ) ;if > > > > ) ;while > > > > (if (= 52 (getvar "errno")) > > > > (exit) > > > > (c:ED) > > > > ) > > > > (*Error* nil) > > > > (princ) > > > > ) ;end > > > > > > > > "akdrafter" wrote in message > > > > news:19496099.1078961506063.JavaMail.jive@jiveforum2.autodesk.com... > > > > > Hello, > > > > > > > > > > I found the lisp file pasted below this message a long time ago and > like > > > using it > > > > over the double click to edit and the new 2002 enhanced edit. All I > want > > > to do is > > > > select any text type (text, mtext, dimension text, attdef & inserts > with > > > att's) and > > > > then run the appropriate text edit command on it. > > > > > > > > > > To edit text, mtext, dimension tex & attdef's = .ddedit > > > > > > > > > > To edit inserts w/att's = .ddatte > > > > > > > > > > The routine works fine except that if I select an object and it uses > the > > > .ddedit I > > > > can not select an object that uses .ddatte unless I end the routine > and > > > restart it. I > > > > remember this being able to pick both type within one session of the > lisp, > > > but it > > > > does not work in 2002. > > > > > > > > > > Any ideas why? Better way of doing this...via lisp? > > > > > > > > > > Thanks in advance. > > > > > > > > > > "Catch" Ya Later, > > > > > AKDRAFTER > > > > > > > > > > > > > > > ;;; ET by David Harrington and Scott Gauthier > > > > > ;;; Edit any text type object > > > > > ;;; > > > > > ;;; Main Program > > > > > ;;; > > > > > (defun C:ED (/ ent ent_typ olosmode olcmdecho et_error old_error) > > > > > (defun et_error (msg) > > > > > (if (or (= msg "Function cancelled") (/= msg "quit / exit abort")) > > > > > (princ (strcat "Error: " msg)) > > > > > ) > > > > > (setvar "CMDECHO" olcmdecho) > > > > > (setvar "OSMODE" olosmode) > > > > > (setq *error* old_err > > > > > old_err nil > > > > > et_error nil > > > > > ) > > > > > (princ) > > > > > ) > > > > > (setq old_err *error* > > > > > *error* et_error > > > > > ) > > > > > (princ "\n ET - Edit Textural Object") > > > > > (setq olosmode (getvar "OSMODE") > > > > > olcmdecho (getvar "CMDECHO") > > > > > ) > > > > > (setvar "cmdecho" 0) > > > > > (setvar "osmode" 0) > > > > > (while (not (setq ent (entsel "\nSelect text object: "))) > > > > > (princ "\nNothing Selected... \nPick Again..") > > > > > ) > > > > > (cond > > > > > ( (or > > > > > (= (setq ent_typ (cdr (assoc 0 (entget (CAR ent))))) "TEXT") > > > > > (= ent_typ "MTEXT") > > > > > (= ent_typ "DIMENSION") > > > > > (= ent_typ "ATTDEF") > > > > > ) > > > > > (command ".ddedit" (CAR ent)) > > > > > ) > > > > > ((= ent_typ "INSERT") > > > > > (command ".ddatte" (CAR Ent)) > > > > > ) > > > > > ) > > > > > (setvar "OSMODE" olosmode) > > > > > (setvar "CMDECHO" olcmdecho) > > > > > (setq *error* old_err) > > > > > (princ) > > > > > ) > > > > > (princ) > > > > > ; > > > > > > > > > > > > > > > > > > > >
Message 8 of 18
Anonymous
in reply to: akdrafter

You're welcome. Let me know if you find any problems. I'll check this thread for a few more days. You can't email me directly. The spammers toasted that option. Joe Burke "akdrafter" wrote in message news:31514741.1079125109388.JavaMail.jive@jiveforum2.autodesk.com... > Warren, > > For my particular use of this routine. I do not use arcaligntext. > > Thanks for the help Joe. > > "Catch" Ya Later, > AKDRAFTER
Message 9 of 18
Anonymous
in reply to: akdrafter

I was only pointing out that this was one of the available options that could be used in AutoCAD. As you stated it is an Express Tools routine and would only be available if installed. We all have bad days and no bad thoughts were in my message. I've enjoyed your many posts and have gleaned quite a few hints from them. Thanks. "Joe Burke" wrote in message news:4052d090$1_3@newsprd01... > Warren, > > Sorry, you caught me in a bad mood. My apologies. > > It crossed my mind. As far as I know Express Tools is required for editing ArcText > prior to A2k4. So there didn't seem much point including support and error checking > for something akdrafter might not have. And it wasn't mentioned in the original > message. > > I haven't installed A2k4 yet, so I don't know what the command is or how the editor > works. Now that it is included (assuming it is), I agree the program should support > it. > > Regards > Joe Burke > > "Warren Trost" wrote in message > news:4051b870_1@newsprd01... > > Just a simple question about editing anything per the original comment in > > the ED routine stating editing anything. No sarcasm or criticism intended. > > > > > > "Joe Burke" wrote in message > > news:40506af1$1_1@newsprd01... > > > Warren, > > > > > > Do you have a point here... or are you just tossing spitballs? > > > > > > I'm using A2k2. > > > > > > Joe Burke > > > > > > "Warren Trost" wrote in message > > > news:40506675$1_2@newsprd01... > > > > No ARCALIGNTEXT? > > > > > > > > I know it's not straight AutoCAD. > > > > > > > > "Joe Burke" wrote in message > > > > news:40506266_1@newsprd01... > > > > > akdrafter, > > > > > > > > > > I think this is what you want. I also think the logic so fouled up, > > I'm > > > > almost > > > > > embaressed to post it. > > > > > > > > > > It should work continuously until the user hits Enter. It should allow > > > > editing of any > > > > > type of text using the appropriate dialog. It should catch missed > > picks or > > > > wrong > > > > > object types and continue. > > > > > > > > > > Joe Burke > > > > > > > > > > ; JB 3/11/2004 > > > > > (defun c:ED ( / *Error* typlst ename typ ) > > > > > (defun *Error* (Msg) > > > > > (cond > > > > > ((or (not Msg) > > > > > (member Msg '("console break" > > > > > "Function cancelled" > > > > > "quit / exit abort")))) > > > > > ((princ (strcat "\nError: " Msg))) > > > > > ) ;cond > > > > > (setvar "cmdecho" 1) > > > > > (princ) > > > > > ) ;end error > > > > > > > > > > (setq typlst '("TEXT" "MTEXT" "DIMENSION" "ATTDEF" "INSERT")) > > > > > (setvar "errno" 0) > > > > > (setvar "cmdecho" 0) > > > > > (while (/= 52 (getvar "errno")) > > > > > (if > > > > > (and > > > > > (setq ename (car (entsel "\nSelect object or Enter to end: > > "))) > > > > > (member (cdr (assoc 0 (entget ename))) typlst) > > > > > ) > > > > > (progn > > > > > (setq typ (cdr (assoc 0 (entget ename)))) > > > > > (if (= "INSERT" typ) > > > > > (command ".ddatte" ename (command)) > > > > > (command ".ddedit" ename (command)) > > > > > ) > > > > > (setvar "errno" 0) > > > > > ) > > > > > (progn > > > > > (if (/= 52 (getvar "errno")) > > > > > (princ "\nMissed pick or wrong object type: ") > > > > > ) > > > > > ) > > > > > ) ;if > > > > > ) ;while > > > > > (if (= 52 (getvar "errno")) > > > > > (exit) > > > > > (c:ED) > > > > > ) > > > > > (*Error* nil) > > > > > (princ) > > > > > ) ;end > > > > > > > > > > "akdrafter" wrote in message > > > > > news:19496099.1078961506063.JavaMail.jive@jiveforum2.autodesk.com... > > > > > > Hello, > > > > > > > > > > > > I found the lisp file pasted below this message a long time ago and > > like > > > > using it > > > > > over the double click to edit and the new 2002 enhanced edit. All I > > want > > > > to do is > > > > > select any text type (text, mtext, dimension text, attdef & inserts > > with > > > > att's) and > > > > > then run the appropriate text edit command on it. > > > > > > > > > > > > To edit text, mtext, dimension tex & attdef's = .ddedit > > > > > > > > > > > > To edit inserts w/att's = .ddatte > > > > > > > > > > > > The routine works fine except that if I select an object and it uses > > the > > > > .ddedit I > > > > > can not select an object that uses .ddatte unless I end the routine > > and > > > > restart it. I > > > > > remember this being able to pick both type within one session of the > > lisp, > > > > but it > > > > > does not work in 2002. > > > > > > > > > > > > Any ideas why? Better way of doing this...via lisp? > > > > > > > > > > > > Thanks in advance. > > > > > > > > > > > > "Catch" Ya Later, > > > > > > AKDRAFTER > > > > > > > > > > > > > > > > > > ;;; ET by David Harrington and Scott Gauthier > > > > > > ;;; Edit any text type object > > > > > > ;;; > > > > > > ;;; Main Program > > > > > > ;;; > > > > > > (defun C:ED (/ ent ent_typ olosmode olcmdecho et_error old_error) > > > > > > (defun et_error (msg) > > > > > > (if (or (= msg "Function cancelled") (/= msg "quit / exit abort")) > > > > > > (princ (strcat "Error: " msg)) > > > > > > ) > > > > > > (setvar "CMDECHO" olcmdecho) > > > > > > (setvar "OSMODE" olosmode) > > > > > > (setq *error* old_err > > > > > > old_err nil > > > > > > et_error nil > > > > > > ) > > > > > > (princ) > > > > > > ) > > > > > > (setq old_err *error* > > > > > > *error* et_error > > > > > > ) > > > > > > (princ "\n ET - Edit Textural Object") > > > > > > (setq olosmode (getvar "OSMODE") > > > > > > olcmdecho (getvar "CMDECHO") > > > > > > ) > > > > > > (setvar "cmdecho" 0) > > > > > > (setvar "osmode" 0) > > > > > > (while (not (setq ent (entsel "\nSelect text object: "))) > > > > > > (princ "\nNothing Selected... \nPick Again..") > > > > > > ) > > > > > > (cond > > > > > > ( (or > > > > > > (= (setq ent_typ (cdr (assoc 0 (entget (CAR ent))))) "TEXT") > > > > > > (= ent_typ "MTEXT") > > > > > > (= ent_typ "DIMENSION") > > > > > > (= ent_typ "ATTDEF") > > > > > > ) > > > > > > (command ".ddedit" (CAR ent)) > > > > > > ) > > > > > > ((= ent_typ "INSERT") > > > > > > (command ".ddatte" (CAR Ent)) > > > > > > ) > > > > > > ) > > > > > > (setvar "OSMODE" olosmode) > > > > > > (setvar "CMDECHO" olcmdecho) > > > > > > (setq *error* old_err) > > > > > > (princ) > > > > > > ) > > > > > > (princ) > > > > > > ; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
Message 10 of 18
Anonymous
in reply to: akdrafter

Hey Joe: Downloaded and am using your ed.lsp from 3-11-2004. Thanks for posting it. I have one question though, is there a way to modify it to edit nested text? If it could edit nested text, it truly would be a universal test editor. Thanks again for your post. Harold
Message 11 of 18
Anonymous
in reply to: akdrafter

Harold, Sorry about the late reply. I haven't checked this thread in awhile. Do you mean for instance, text that's not an attribute nested in a block insert? If so, maybe. It would have to check for nested text (nentselp with the entsel pick point) and then call the command line version of refedit. This so you'd have either the dtext or mtext editor to modify the text. I've never tried to use -refedit inside a lisp program, so I don't know what if any problems that might present. Joe Burke "Harold Leveritt" wrote in message news:40570623.8ABBDC62@NOSPAMPLEASEbellsouth.net... > Hey Joe: > > Downloaded and am using your ed.lsp from 3-11-2004. Thanks for posting > it. I have one question though, is there a way to modify it to edit > nested text? If it could edit nested text, it truly would be a > universal test editor. > > Thanks again for your post. > > Harold >
Message 12 of 18
Anonymous
in reply to: akdrafter

Thanks for the reply Joe: That's correct, I'm trying to make it edit dtext nested within a block. Thanks for your input. Harold
Message 13 of 18
Anonymous
in reply to: akdrafter

Harold, I'll try to find some time to play with it in the next day or two. It's a good suggestion, assuming the user understands, or is alerted to the fact, doing so will modify the text in all inserts with the same name. Maybe -refedit will take care of that. I would try it as a standalone program first. If it can work that way, then think about how to integrate into the one-click text edit program. Any insights into methods you've already tried would be welcome. Joe Burke "Harold Leveritt" wrote in message news:405EDA82.8E2D6056@NOSPAMPLEASEbellsouth.net... > Thanks for the reply Joe: > > That's correct, I'm trying to make it edit dtext nested within a block. > Thanks for your input. > > Harold >
Message 14 of 18
Anonymous
in reply to: akdrafter

Harold, Looks like it might work. Try this standalone. No error checking, just proof of concept. Should work with dtext or mtext nested in a block insert one level deep. (defun c:EditNestedText ( / ent pt ) (setq ent (entsel "\nSelect text nested in a block: ")) (setq pt (cadr ent)) (command "-refedit" pt "OK" pt "" "") (command "ddedit" pt (command)) (command "refclose" "") (princ) ) Joe Burke "Harold Leveritt" wrote in message news:405EDA82.8E2D6056@NOSPAMPLEASEbellsouth.net... > Thanks for the reply Joe: > > That's correct, I'm trying to make it edit dtext nested within a block. > Thanks for your input. > > Harold >
Message 15 of 18
Anonymous
in reply to: akdrafter

Joe: Got the attached lisp to work except with dimension text. What do you think of it? Harold Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp" Attachment not added (content type not allowed): "Txe.dcl" Attachment not added (content type not allowed): "Txe.lsp"
Message 16 of 18
Anonymous
in reply to: akdrafter

Harold, That's good. I like it more than the refedit idea, which gives me a shiver for some reason. I know nothing about DCL. Can you make a dialog that would handle mtext and dimension text? Just basic editing. Joe Burke "Harold Leveritt" wrote in message news:4061D224.1329BCE4@NOSPAMPLEASEbellsouth.net... > Joe: > > Got the attached lisp to work except with dimension text. What do you > think of it? > > Harold >
Message 17 of 18
Anonymous
in reply to: akdrafter

I'm working on it, but feel free to suggest and revise if you like. Harold
Message 18 of 18
Anonymous
in reply to: akdrafter

Harold, As I said, I'm totally in the dark regarding DCL. So if that's the best solution for nested text, the ball is in your court for now. When I need a dialog I use DOSLib. In this case I guess the function would be dos_getstring. roughly: get the nested string (setq str (vlax-get vobj 'textstring)) (setq newstr (dos_getstring "edit text" "enter new string" str 250)) (vlax-put vobj 'textstring newstr) Joe Burke "Harold Leveritt" wrote in message news:4062CE9F.97D6927C@NOSPAMPLEASEbellsouth.net... > I'm working on it, but feel free to suggest and revise if you like. > > Harold >

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

Post to forums  

Autodesk Design & Make Report

”Boost