• 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

Numbering LISP Routines: Auto-Increment Numbers in AutoCAD

June 18, 2020

Last updated July 27, 2026

Prefer the routine to write itself? Here’s AI drafting in AutoCAD via MCP and AutoLISP — tested hands-on in 2026.

Numbering is a small free AutoLISP file by Paul that bundles seven sequential-labelling commands into one 3 Kb download. Load it once and you can click your way along a drawing placing ascending numbers, decimal values, letters, or bubble tags — one label per pick, until you press Enter.

It suits any job where you number things in a row: grid bubbles, parking bays, room tags, equipment schedules, survey points, panel labels. The collection also remembers where you left off, so you can stop, do something else, then run the command again and carry on from the next value in the sequence.

What it does in practice

The five number commands ask for an increment and a starting value; the two letter commands ask for a starting letter instead. Then you pick points on screen; each pick places the current label and bumps the counter. Pressing Enter at a location prompt ends the run. Defaults appear in angle brackets, and because the routine stores your last answers in session variables (the mechanism is covered in AutoLISP Lesson 5 on variables), those defaults track your previous run — the download description puts it as “it remembers last inserted text and suggests the continuation”.

Text is placed middle-justified on the point you pick, in the current text style, with the height taken from DIMTXT multiplied by DIMSCALE (a DIMSCALE of 0 is treated as 1.0). That middle justification is what lets the bubble commands centre a number neatly inside its circle or hexagon. The two bubble commands even enlarge the enclosure once the number passes 99, so three-digit tags still fit. TIT, TRT and the two letter commands switch off running object snaps while you place text and restore them afterwards; the three plain number commands leave osnaps alone.

Command reference

Each routine is a separate command; the file prints a reminder line for each one as it loads. In the file they are defined in lower case, but AutoCAD command entry is not case sensitive.

  • TIT — ascending whole numbers wrapped in optional prefix and suffix text (text + integer + text).
  • TRT — the same idea with real numbers, written to three decimal places (text + real + text).
  • NMC — ascending whole numbers inside a circle, sized from the same DIMTXT × DIMSCALE height as the number it encloses.
  • NMP — ascending whole numbers inside a hexagon.
  • NM — plain ascending whole numbers, no enclosure. Use this one when you want bare numbers with no prefix or suffix.
  • AAZZ — ascending capital letters A to Z, each inside a circle. Input is case insensitive; output is upper case only.
  • AAD — ascending capital letters with optional prefix text, placed without an enclosure.

How to load it

Unzip the download, then load numbering.lsp with APPLOAD (or drag the file into the drawing window). To have it available every session, add it to the Startup Suite in the APPLOAD dialog. All seven commands become available as soon as the file loads — watch the command line for the “Type > TIT <” reminder messages. If loading LISP files is new to you, start with the AutoLISP programming guide.

Step-by-step usage

A typical run of TIT looks like this:

  • Type TIT. At “Increment numbers by < 1 >? :” press Enter to accept the default or type a new step.
  • At “Start or continue with number < 1 >? :” press Enter to continue the remembered sequence or type a fresh starting number.
  • At “Prefix text” and “Suffix text” either type the text, press Enter to reuse the remembered value, or type “.” (a full stop) for none — the prompt reads “or <.> for none”.
  • At “Insert:” pick the first point, then keep picking at “Next number location:”. Press Enter to finish.

The letter commands work the same way. AAZZ asks “Start with letter < A >? :” and then prompts for each placement; when you pass Z it reports “End of Alphabet – start over – next default = A”. Run any command again in the same session and the bracketed defaults pick up where the previous run stopped.

Compatibility notes

The spec table lists this as working on AutoCAD, and the code is plain AutoLISP: no DCL dialog boxes and no Express Tools (acet-) calls. On that basis it should also load on AutoCAD LT 2024 and later, which added AutoLISP support, though we have not run it on LT — see what runs on AutoCAD LT for the details. Because the text height comes from DIMTXT and DIMSCALE, check those system variables suit your drawing scale before you start clicking; in a template where both are left at defaults the labels may come out smaller than you expect.

Download

Name: Numbering
Description: There are 7 routines in this one lisp file. It inserts ascending numbers or letters etc..
until you press [enter]. It remembers last inserted text and suggests the continuation.
Descriptions and calling codes for each function are in the beginning of the file.
Type: AutoCAD AutoLISP Routine
Author: Paul
File Size: 3 Kb
Cost: Free
Worked on: AutoCAD
Download File: Numbering.zip

Related routines

  • Add or Subtract Text — adjust numeric values in text you have already placed.
  • Best of LISP collection — another multi-routine bundle worth keeping in your Startup Suite.
  • ArcText — place text along an arc when a straight label will not do.

References

  • AutoLISP programming guide
  • Free LISP routine library
  • AutoLISP Lesson 5: Variables
  • What runs 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