AutoCAD 2000/2000i/2002 Archive

Reply
*Marbury, Frank
Message 1 of 3 (189 Views)

Changing text to all caps

189 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
Message 2 of 3 (189 Views)

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
Message 3 of 3 (189 Views)

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube