Lower

Short description

Sort / Purpose: Convert selected TEXT and MTEXT entities to either all upper case or all lower case in a single operation.Scope: Operates only on existing TEXT and MTEXT objects that you select in the drawing.Goal: Standardize the letter case of annotations quickly for consistent drawing documentation.

Command:

Command name: CASE How to run: Type CASE in the command line and press Enter.

Description:

Selection: Prompts the user to select TEXT and MTEXT entities to be modified.Case Option: Lets the user choose between converting to Upper or Lower case, with Upper as the default when Enter is pressed.Processing: Reads each entity’s text content, converts it, and writes the new value back to the entity.System Handling: Temporarily disables command echo and precision settings, restoring them afterward.Failure Handling: Warns the user if no valid text entities are detected in the selection.

Helper function: (if any)​

Used AutoLISP / AutoCAD built-ins:getvar / setvar: Save and restore CMDECHO and LUPREC values.ssget / ssname / sslength: Build and iterate through the selection set of text entities.entget / entmod: Read and rewrite DXF data of each text entity.assoc / subst: Extract and replace group code 1 (text string).strcase: Convert existing text to upper or lower case.initget / getkword: Provide and enforce the “Upper/Lower” option selection.prompt / princ: Display clean messages and terminate silently.

Functionalities:

Supports TEXT & MTEXT: Works on both object types simultaneously.Uppercase Mode: Converts all selected text content to uppercase.Lowercase Mode: Converts all selected text content to lowercase.Default Behavior: Uppercase is automatically used if no choice is provided.Non-Destructive: Only the string content is modified; all other entity properties remain unchanged.Environment-Safe: Resets all system variables changed during execution.

Result:

Result: All selected TEXT and MTEXT entities are converted to the chosen case (Upper or Lower) instantly.Uniform Formatting: Every selected annotation ends with consistent capitalization across the drawing.Non-destructive: Only the text content changes — layer, style, color, rotation, and position remain untouched.Clean Execution: System settings are restored automatically, leaving the environment unchanged after the command finishes.Immediate Feedback: The text updates visually in the drawing as soon as the command loops through all entities. Copy code: Copy CASE LISP

Images, animations etc.

Pixel

Additional info:

Share this page:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x