This routine is great because not every text object in a drawing needs to be capitalized and this routine lets you simply select the text objects that you want to be capitalized.
It’s that simple…
BTW – it works with DTEXT as well as MTEXT
Here’s how:
- ALLCAPS <enter> to start
- Select text objects that are to be capitalized
- <enter> when finished selecting objects

;| ;************************************************************ ;ALLCAPS.LSP - (c) 1997-2001 Tee Square Graphics ; ;Converts selected text strings to all upper case characters. ; Written 08/21/97 for F&K Engineers. ; Updated 04/01/98 for AutoCAD R14. ; Modified 02/15/99 - minor improvements. ; Removed extra leading ";" from posted version 12/4/01. ;************************************************************ ;|; (defun C:ALLCAPS (/ cmd ss n txt strg) (command "_.undo" "_be") (setq cmd (getvar "cmdecho")) (prompt "\nSelect Text String(s) to modify: ") (setq ss (ssget '((0 . "TEXT,MTEXT"))) n (sslength ss)) ; Count items. (while (> n 0) ; While more to do, (setq n (1- n) ; decrement count, txt (entget (ssname ss n)) ; get entity, strg (strcase (cdr (assoc 1 txt))) ; force to caps, txt (subst (cons 1 strg)(assoc 1 txt) txt)) ; update entity, (entmod txt)) ; change in dwg. (setvar "cmdecho" cmd) (command "_.undo" "_e") (princ) ; Done! ) ;(alert (strcat ; "** ALLCAPS.LSP - (c) 1997-2001 Tee Square Graphics **\n\n" ; "Type ALLCAPS at the AutoCAD Command: line to start.")) ;(princ)