AutoCAD offers no strikethrough at all, and its underline is an MText formatting code that plain Text and attributes cannot use. RuleText draws the rules as real polylines instead, so every text type is supported and the result plots identically everywhere. It also works in AutoCAD LT.
What RuleText does
Twelve commands, six styles in two forms each. RULE1, RULE2 and RULE3 give single, double and triple strikethrough. RULEU and RULEU2 give underline and double underline. RULEOU gives a double overline and underline together.
Each has an M form — MRULE1, MRULEU and so on — which takes a window selection instead of single picks, and reaches attributes inside blocks automatically.
The single-pick forms keep prompting until you press Enter, so several items can be ruled in one go.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type the style you want —
RULE1for a single strikethrough,RULEUfor an underline. - Pick text items one at a time, or use the
Mform and window a selection. - Press Enter to finish.
How it works
Each rule is described by a pair of factors, both multiples of the text height:
(<vertical offset from centre> <line width>)
So (0.0 0.1) is a line straight through the middle at a tenth of the text height thick, and (-0.8 0.1) sits below the baseline as an underline.
Working in multiples of text height means one definition looks correct at every text size. A strikethrough on 2.5 mm text and the same strikethrough on 7 mm text are both proportionate, without anything being recalculated.
The rule spans the text’s true bounding box and follows its rotation, so rotated text is ruled along its own axis rather than horizontally across it.
Edit the factor lists in the command definitions at the foot of the file to add your own variants — a triple underline, or a rule at a different weight, is one more line.
Notes and limits
- The rules are real polylines, not formatting. They can be selected, moved and erased independently of the text.
- They do not follow the text if it is edited. Change the wording and the rule stays the old length.
- Works in AutoCAD LT, which the MText underline code does not help with on plain Text and attributes.
- One undo group covers the run.
Download and details
| Name | RuleText — strikethrough and underline for Text, MText and attributes |
| Download | RuleText.lsp — 16.1 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Commands | MRULE1, MRULE2, MRULE3, MRULEOU, MRULEU, MRULEU2, RULE1, RULE2, RULE3, RULEOU, RULEU, RULEU2 |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com). |
| Source size | 16.1 KB, 396 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| Compatibility | AutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer. |
| Author | YZ, August 2026 |
| Licence | Free to use, supplied “as is” with no warranty. |
References
- TEXTFRAME LISP — draw a frame around text rather than a rule through it
- Text heights in drawings — the height the rule factors are multiples of
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program