Oops! - Header should read " Help Modifying Text Width Lisp "
I don't know where this code originated
(It's pretty old...)
but can someone *PLEASE* help me modify it
to also work with MTEXT and DIMENSIONS?
-Edit 7.29.2010
**After some research, screw MTEXT!! - not worth the hassle! **
I just need it to work with the various dimensions.
Associative, Multileader, etc.
(DEFUN C:TW (/ P OPTION NSTYLE NWIDTH L N E)
(PROMPT "\nChanges text width: ")
(setvar "cmdecho" 0)
(graphscr)
(command "undo" "m")
(Prompt "\nSelect text to be changed: ")
(setq olderr *error*
*error* cterr)
(setq p (ssget))
(SETQ OPTION "Width")
(cond
((eq option "Width")
(setq nwidth (getreal "\nEnter new width for text: "))))
(if p
(progn
(setq l 0 n (sslength p))
(while (< l n)
(if (= "TEXT"
(cdr (assoc 0 (setq e (entget (ssname p l))))))
(progn
(cond
((eq option "Width")
(setq e (subst (cons 41 nwidth) (assoc 41 e) e))))
(entmod e)))
(setq l (1+ l)))))
(princ))
While I would like to know HOW to modify this code,
if there is another routine better suited to change
the text width of any "text-related" entities I am
open to such as well...
Thanks!!