Uppercase to Lowercase LISP
Uppercase to Lowercase LISP
(OP)
Hi all,
Can anyone point me to a LISP routine for Autocad 2000 that will take a line of uppercase text and turn it into lowercase text?
Unfortunately the text is not MTEXT, so I suppose that a useful alternative routine would be one that turns several lines of text into an MTEXT block.
I have a lot of old R14 lisps which I can't get to all work in 2000, one of which does the UC/LC conversion.
Any help appreciated,
GAllen
Can anyone point me to a LISP routine for Autocad 2000 that will take a line of uppercase text and turn it into lowercase text?
Unfortunately the text is not MTEXT, so I suppose that a useful alternative routine would be one that turns several lines of text into an MTEXT block.
I have a lot of old R14 lisps which I can't get to all work in 2000, one of which does the UC/LC conversion.
Any help appreciated,
GAllen





RE: Uppercase to Lowercase LISP
Here goes your routine:
(defun C:TCASE ()
(prompt "\nTCASE - Change text strings to upper or lower case")
(setq SELECTION_SET (ssget))
(setq NO_OF_ITEMS (sslength SELECTION_SET))
(initget 1 "U L")
(setq NEWCASE
(getkword "\nWhat case do you want to change them to <Upper or Lower> ? ")
)
(if (equal NEWCASE "U")
(setq CASEFLAG nil)
(setq CASEFLAG T)
)
(setq INDEX 0)
(repeat NO_OF_ITEMS
(setq ENTITY_NAME (ssname SELECTION_SET INDEX))
(setq OLD_ENTITY_LIST (entget ENTITY_NAME))
(setq ENTITY_TYPE (cdr (assoc 0 OLD_ENTITY_LIST)))
(if (equal ENTITY_TYPE "TEXT")
(progn
(setq OLD_STRING (assoc 1 OLD_ENTITY_LIST))
(setq NEW_STRING
(cons 1 (strcase (cdr OLD_STRING) CASEFLAG))
)
(setq NEW_ENTITY_LIST
(subst NEW_STRING OLD_STRING OLD_ENTITY_LIST)
)
(entmod NEW_ENTITY_LIST)
)
)
(setq INDEX (1+ INDEX))
)
(prompt "\nProgram complete.")
(princ)
)
Hope that helps,
Roberto.
RE: Uppercase to Lowercase LISP
RE: Uppercase to Lowercase LISP
Striker - I don't have any experience with VBA at all, I'm pretty much a hack drafty (engineer in other words ;) ).
Thanks
GAllen
RE: Uppercase to Lowercase LISP
DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
RE: Uppercase to Lowercase LISP
D55
ddoggett@winkdavis.com
RE: Uppercase to Lowercase LISP
here's my standard reply: Use Express Tools V1-9!!
Search in this forum for the download-link.
-> then You can write:
· Sentence case
· lowercase
· UPPERCASE
· Title
· tOGGLE cASE
regards Lothar
Win NT4.0(SP6),2000(SP3)
AC 2000i(SP2), ADT 3.0(SP3),
AC 2002, ADT 3.3,
AC 2004, ADT 2004
RE: Uppercase to Lowercase LISP
RE: Uppercase to Lowercase LISP
GAllen
RE: Uppercase to Lowercase LISP
RE: Uppercase to Lowercase LISP