• 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

LE LISP: Draw a Leader Then Place Its Text in AutoCAD

September 19, 2020

Last updated July 28, 2026

This draws a leader line and then puts you straight into placing the text at the end of it — two operations that always go together, joined into one command.

It is from Superior Designs, the same source as the CHT text standardiser, the LS layer setter and the ADD calculator on this site.

It will not work as downloaded

This needs saying before anything else, because you will otherwise spend a while wondering what you did wrong.

The routine puts its leader on a dedicated layer, and it gets that layer’s name from a variable called dimL. The variable is used three times in the file. It is never set anywhere in the file.

In the author’s own setup that name was presumably defined by another routine loaded alongside it — a company standard file, or one of his other programs. Distributed on its own, that context is missing, so the layer command receives nothing and the routine will not behave.

The fix is one line. Decide what layer you want your leaders on and set the variable before running the command, either by typing it once per session or by adding a line to the top of the file:

(setq dimL "DIM")

Substitute your own layer name for DIM. The layer needs to exist, since the routine sets it current rather than creating it.

What it does once it runs

It switches to the leader layer, remembering the layer you were on, then asks for the leader points. You give it a start point and one or two more, so the leader can be a single segment or have a kink in it.

The arrow size is worked out from your DIMSCALE setting rather than being fixed, which means leaders come out consistent across a drawing and correct at whatever scale you are working at. The routine shortens the line by that amount so the arrowhead sits properly at the end rather than overshooting.

Its error handler restores your original layer and command echo, so cancelling partway through does not leave you on the leader layer wondering why your next line came out wrong. That is better manners than several routines in this library manage.

Command reference

The command is LE, not LTE — the download is called Lte.zip and the file inside is le.lsp, so the two-letter form is what you type.

Two letters is worth checking against your own aliases first. Note also that AutoCAD’s own quick leader command has occupied similar ground for a long time, so if you have an alias pointing at that you will want to pick a different name here.

How to load it

Unzip Lte.zip, add the dimL definition described above, then load le.lsp with APPLOAD or put it in the Startup Suite. No support files. Our AutoLISP guide covers loading.

Step-by-step usage

  1. Make sure your leader layer exists and dimL names it.
  2. Check DIMSCALE suits your plot scale, since it sizes the arrow.
  3. Type LE.
  4. At “Add/<From point>:” pick the point the leader should point at.
  5. At “To point:” pick the next point, and again for a second segment if you want a kink. Press Enter to stop and place the text.

Compatibility notes

No date in the file; the author’s other work here is dated 1994 to 1997. Written-for rather than tested-on. It uses standard point and angle functions with the LINE, LAYER and text commands, none of which has changed — the missing variable is the obstacle, not the age.

Plain AutoLISP with no dialog boxes and no Express Tools calls, so nothing requires the full product; LT users on LT 2024 or later, the release that brought AutoLISP to LT, should be able to run it once the variable is supplied. See what runs on AutoCAD LT.

Download

Name: Line Then Text
Description: Lisp routine for drawing a line and then entering text.
Type: AutoCAD AutoLISP Routine
Author: C Carr
File Size: 1 Kb
Cost: Free
Worked on: AutoCAD
Download File: Lte.zip

Related routines

  • AL — a squiggly leader for presentation drawings.
  • LS — the same author’s layer setter, which will create the layer this one needs.
  • TEXTSIZE — get DIMSCALE right before you start.

References

  • AutoLISP: the complete guide
  • Free LISP routines library
  • AutoLISP Lesson 5: Variables
  • AutoLISP on AutoCAD LT

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