• 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

ATEXT LISP: Draw Text Along an Arc in AutoCAD (Free)

September 18, 2020

Last updated July 28, 2026

ATEXT draws a line of text around an arc, one character at a time, each rotated to sit square to the curve. You select an arc, type your text, and the routine spaces the characters evenly across the arc’s included angle. It is the tool you reach for when a label has to follow a road centreline, a curved wall, a pipe run or a title band.

Its provenance is better than most free routines: the header carries an Autodesk copyright dated 1988 to 1992, credits Larry Knott, and grants permission to use, copy, modify and distribute it without fee provided the notice travels with it. This is a sample routine from Autodesk’s own stable, and it reads like one — commented line by line, and careful about the things period routines usually got wrong.

What it does in practice

Pick an arc and the routine reads its centre, radius, start angle and end angle straight out of the entity, then works out the included angle. Where you click matters: it snaps to the arc endpoint nearest your pick point, and that endpoint becomes the start of the text. Click near the other end and the text runs the other way. That single behaviour is the whole of the direction control — there is no reverse option to set.

It then divides the included angle by one less than the number of characters and steps around the arc placing each character with AutoCAD’s TEXT command, centre-justified, rotated ninety degrees off the radius so it stands upright relative to the curve. While it works it switches off command echo, object highlighting and blips so the screen stays quiet.

One consequence worth understanding before you use it in anger: every character becomes its own independent text entity. A twelve-character label is twelve objects. They do not reflow if you edit them, and changing the wording means erasing the lot and running the command again. That is the trade-off for text that genuinely follows a curve.

Two things the code does that are worth knowing

It handles text height properly. Before drawing, it checks whether the current text style has a fixed height. If the style height is zero it asks you for a height; if the style already defines one it stays quiet and lets the style decide. A surprising number of routines from this era get that wrong and break when the style is set the other way.

It is less careful on the way out. Rather than saving your settings and putting them back, it sets command echo, highlighting and blips to 1 when it finishes — whatever they were before. Blip marks are off by default in modern AutoCAD, so running ATEXT will switch them on and leave them on. Set BLIPMODE back to 0 afterwards if the little crosses bother you.

There is also one input that will stop it: a single character. The character spacing is calculated by dividing the arc’s included angle by the text length minus one, so a one-character string divides by zero and the routine errors out. Give it two characters or more.

Command reference

The file defines a single command, ATEXT. The download is Atext.zip and the file inside is ATEXT.LSP.

How to load it

Unzip Atext.zip and load ATEXT.LSP with APPLOAD, or add it to the Startup Suite if you want it in every drawing. There are no support files to place and no dialog to find, so nothing else has to be on the search path. Our AutoLISP guide covers loading if it is new to you.

Step-by-step usage

  1. Draw the arc you want the text to follow, and set the layer and text style you want the result on.
  2. Type ATEXT. It announces itself with “*** Draws text on arcs ***”.
  3. At “Select arc:”, click the arc near the end you want the text to start from. Picking something that is not an arc gets you a message naming the object type followed by “, Not an arc.” and another attempt; clicking empty space gets “No object found.”
  4. If your current text style has a height of zero, it asks “Height:”. Type a value or pick a distance on screen. If the style has a fixed height this prompt does not appear.
  5. At “Text:”, type the string and press Enter. The characters appear around the arc.

If the spacing is too tight or too loose, undo, adjust the arc’s radius or included angle, and run it again — the text always spreads across the whole arc, so the arc is the control.

Compatibility notes

Full AutoCAD has shipped an ARCTEXT command in Express Tools for many years, and where that is available it is the better tool: it keeps the text as one editable object. This routine earns its place elsewhere. Express Tools are not part of AutoCAD LT, and LT did not gain AutoLISP at all until LT 2024 — so for LT 2024 and later users this is a way to get curved text at all. ATEXT is plain AutoLISP with no dialog boxes and no Express Tools calls, using only entsel, entget, osnap, polar and the TEXT command, so there is nothing in it that requires the full product. See what runs on AutoCAD LT for the wider picture.

The copyright range ends in 1992, so this is written-for rather than tested-on code as far as current releases go. Being an Autodesk sample it is also worth reading: it is a compact, well-commented example of pulling geometry out of an entity and stepping around it.

Download

Name: ARCTEXT
Description: Draws center aligned text along an ARC.
The start point of the text is the ENDpoint of the ARC closest the pick point.
Type: AutoCAD AutoLISP Routine
Author: Larry Knott
File Size: 2 Kb
Cost: Free
Worked on: AutoCAD
Download File: Atext.zip

Related routines

  • TXP — turn finished text into clean polylines.
  • Numbering routines — place sequential labels around a drawing.
  • Best of LISP collection — more text handling utilities in one download.

References

  • AutoLISP: the complete guide
  • Free LISP routines library
  • 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