• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

RULE1 LISP: Strikethrough and Underline for AutoCAD Text

August 3, 2026

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

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type the style you want — RULE1 for a single strikethrough, RULEU for an underline.
  3. Pick text items one at a time, or use the M form and window a selection.
  4. 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

NameRuleText — strikethrough and underline for Text, MText and attributes
DownloadRuleText.lsp — 16.1 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsMRULE1, MRULE2, MRULE3, MRULEOU, MRULEU, MRULEU2, RULE1, RULE2, RULE3, RULEOU, RULEU, RULEU2
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size16.1 KB, 396 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoThe whole operation is wrapped in a single undo group, so one U reverses all of it.
CompatibilityAutoCAD (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.
AuthorYZ, August 2026
LicenceFree 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

Filed Under: AutoLISP Routines

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in