AutoCAD 2000/2000i/2002 Archive

AutoCAD 2000/2000i/2002 Archive

Reply
*Marbury, Frank
Post 1 of 3

Changing text to all caps

216 Views, 2 Replies
09-28-1999 02:18 PM
Is there a way to change text in ACAD from lower
case to all caps and vice versa. Maybe a lisp
routine or something.

Frank Marbury
*Long, Jaysen
Post 2 of 3

Re: Changing text to all caps

09-28-1999 03:33 PM in reply to: *Marbury, Frank
;;; CHCASE.LSP by Jaysen D. Long, Copyright ©1999. All Rights Reserved.

(prompt "\nChange Case by Jaysen D. Long\nCopyright \2511999. All Rights
Reserved.")

(defun c:upcase ( / cc:ss)
(prompt "\nSelect all text to make upper case...")
(if (setq cc:ss (ssget '((0 . "*TEXT,ATTDEF"))))
(chcase cc:ss nil)
(prompt "\nNothing selected.")
)
(princ)
)

(defun c:locase ( / cc:ss)
(prompt "\nSelect all text to make lower case...")
(if (setq cc:ss (ssget '((0 . "*TEXT,ATTDEF"))))
(chcase cc:ss T)
(prompt "\nNothing selected.")
)
(princ)
)

(defun chcase (selection mod / i cc:elist j)
(repeat (setq i (sslength selection))
(setq cc:elist (entget (ssname selection (setq i (1- i)))))
(repeat (setq j (length cc:elist))
(setq j (1- j))
(foreach x (list 1 3)
(if (eq (car (nth j cc:elist)) x)
(setq cc:elist (subst (cons x (strcase (cdr (nth j cc:elist))
mod)) (nth j cc:elist) cc:elist))
)
)
)
(entmod cc:elist)
)
)

Jaysen

Frank Marbury wrote in message <37F130B0.BDCEDC41@kmdenver.com>...
>Is there a way to change text in ACAD from lower
>case to all caps and vice versa. Maybe a lisp
>routine or something.
>
>Frank Marbury
*Held, Luke
Post 3 of 3

Re: Changing text to all caps

09-28-1999 04:24 PM in reply to: *Marbury, Frank
If you go through the Mtext Dialog, select all, then right click on the
highlighted text, if offers you the option to change case.

Frank Marbury wrote in message <37F130B0.BDCEDC41@kmdenver.com>...
>Is there a way to change text in ACAD from lower
>case to all caps and vice versa. Maybe a lisp
>routine or something.
>
>Frank Marbury
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post