Boost Your AutoCAD Productivity with the Ultimate Incremental Numbering LISP (INCNUM)
Are you tired of manually editing text strings for every parking spot, room number, or grid line in your CAD drawings? Manual labeling is not only a time-consuming bottleneck but also a frequent source of human error in professional drafting.
Introducing INCNUM.lsp, a professional-grade AutoLISP routine designed to automate sequential labeling. Whether you need numbers (1, 2, 3), zero-padded sequences (001, 002, 003), or alphabetical sequences (A, B… Z, AA), this script handles it all with precision and speed.
What is the INCNUM AutoLISP Script?
The INCNUM command is a versatile utility for AutoCAD that allows users to place incrementing labels with a single click. Unlike basic scripts, this version is packed with advanced features tailored for real-world engineering and architectural workflows:
- Alphanumeric Support: Seamlessly switch between numerical steps and alphabetical sequencing (including Excel-style “Z to AA” transitions).
- Automatic Layer Management: Automatically creates and organizes labels on a dedicated “INCNUM” layer, keeping drawings clean and structured.
- Intelligent Formatting: Supports custom prefixes, suffixes, and zero-padding (e.g., “Level-01”, “P-001”).
- Geometry Options: Choose between TEXT or MTEXT, with an optional automatic circle enclosure for equipment tagging or callouts.
- Precision Control: Define text height, rotation angles, and increment steps based on project standards.
- Centered Justification: Labels are placed with consistent alignment, avoiding visual drift across layouts.
- Error Handling: Built-in safeguards restore system variables like CMDECHO, preventing session issues after interruptions.
How to Use INCNUM in AutoCAD (Step-by-Step)
Follow these steps to transform your labeling workflow from minutes to seconds:
Download the Script here
Open AutoCAD and type APPLOAD in the command line. Select your IncrementalNumbering.lsp file, click Load, and close the dialog box. Reference: https://help.autodesk.com/view/ACD/2026/ENU/?guid=GUID-APPLOAD
Launch the Command
Type INCNUM and press Enter.
Configure Your Settings
The script walks you through practical setup prompts:
- Mode: Choose Numbers or Letters
- Text Height & Rotation: Defaults to current system values but can be overridden
- Prefix/Suffix: Add static identifiers like “Room-“, “EQ-“, or “-A”
- Padding: Define digit count (e.g., 3 → 001, 002, 003)
- Layer Name: Automatically creates or switches to a dedicated layer
- Text Type: Choose between TEXT or MTEXT
- Enclosure: Option to draw a circle around each label
Click and Label
Once configured, click points in your drawing. Each click places the next item in the sequence. The script handles numbering, formatting, and layer assignment automatically. Press Enter or Esc to exit.
Real-World Use Cases
- Parking layouts: P-01, P-02, P-03
- Room numbering: Room-101, Room-102
- Structural grids: A, B, C… AA
- Electrical panels: DB-01, DB-02
- Equipment tagging: Circle + number callouts
This is the type of repetitive task that burns time on large projects. Automating it frees you to focus on layout and coordination instead of text editing.
Why Every CAD Professional Needs This Tool
Elimination of Repetitive Tasks
In large-scale projects like parking layouts or electrical schedules, manual numbering slows everything down. With INCNUM, you remove hundreds of clicks and keystrokes per sheet.
Professional Accuracy and Standardization
Automated labeling ensures:
- No skipped numbers
- No duplicate tags
- Consistent formatting across sheets
For CAD managers and BIM coordinators, this reduces QA/QC workload significantly.
Seamless Alphabetical Transitions
Most basic LISP routines fail after “Z”. This version implements proper carry logic:
- Z → AA
- AZ → BA
This matters in real projects with large grid systems or phased layouts.
Technical Specifications
- Compatibility: AutoCAD, BricsCAD, GstarCAD
- Language: AutoLISP / Visual LISP
- Deployment: Manual load or Startup Suite integration
- License: Free / Open use
Advanced Tips from the Field
- Add the LISP to your Startup Suite in APPLOAD so the command is always available
- Use a dedicated annotation layer standard (color, lineweight, plot style)
- Combine with block-based workflows for tagging equipment
- Set a consistent text style before running the command to avoid rework
- Use MTEXT when working with annotative scaling environments
Common Mistakes and Fixes
- Text not centered: Ensure justification flags (72/73) are applied in the LISP
- Wrong layer assignment: Check if your current layer is locked or overridden
- Rotation issues: Verify UCS orientation before placing labels
- Padding not applied: Confirm padding value is greater than zero
Download and Full AutoLISP Code (Ready to Use)
The following is the complete INCNUM AutoLISP routine, ready for direct use in production environments. Save the content as a .lsp file (for example, IncrementalNumbering.lsp) and load it using the APPLOAD command in AutoCAD.
This script is provided as freeware, intended for professional drafting workflows. It has been tested in standard AutoCAD environments, but like any custom routine, it should be validated within your own standards, templates, and project conditions before full deployment.
; ------------------------------------------------------------
; INCNUM - Incremental Numbering Tool for AutoCAD
; Author: CADAuthority.com
; Location: Laval, Québec, Canada
;
; NOTICE:
; This AutoLISP program is provided "AS IS" without warranty of any kind.
; CADAuthority.com and any affiliated parties disclaim all responsibility
; for any direct, indirect, incidental, or consequential damages arising
; from the use or misuse of this program.
;
; By using this software, the user accepts full responsibility for all
; outcomes related to its use, including any impact on drawings, data,
; or production workflows.
;
; No guarantees are made regarding compatibility with specific hardware,
; software versions, or project requirements. It is the user’s responsibility
; to test and validate the routine prior to use in a live environment.
;
; Use of this program constitutes acceptance of these terms.
; ------------------------------------------------------------
(defun c:INCNUM (/ *error* oldEcho mode start step prefix suffix txtHeight pt val
defaultTxt rot useCircle radius useMtext layerName padLen)
(defun *error* (msg)
(if oldEcho (setvar "CMDECHO" oldEcho))
(princ (strcat "\nError: " msg))
(princ)
)
(defun alpha-next (str / len i carry ch part1 part2)
(setq str (strcase str)
len (strlen str)
i len
carry 1)
(while (and (> i 0) (= carry 1))
(setq ch (ascii (substr str i 1)))
(if (= ch 90)
(progn
(setq part1 (if (> i 1) (substr str 1 (1- i)) "")
part2 (if (< i len) (substr str (1+ i)) "")
str (strcat part1 "A" part2)
carry 1))
(progn
(setq part1 (if (> i 1) (substr str 1 (1- i)) "")
part2 (if (< i len) (substr str (1+ i)) "")
str (strcat part1 (chr (1+ ch)) part2)
carry 0)))
(setq i (1- i))
)
(if (= carry 1)
(setq str (strcat "A" str))
)
str
)
(defun pad (n width)
(substr (strcat (itoa (+ (expt 10 width) n))) 2)
)
(setq oldEcho (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(initget "Numbers Letters")
(setq mode (getkword "\nMode [Numbers/Letters] <Numbers>: "))
(if (null mode) (setq mode "Numbers"))
(setq defaultTxt (rtos (getvar "TEXTSIZE")))
(setq txtHeight (getreal (strcat "\nText height <" defaultTxt ">: ")))
(if (null txtHeight) (setq txtHeight (getvar "TEXTSIZE")))
(setq rot (getreal "\nRotation angle (deg) <0>: "))
(if (null rot) (setq rot 0.0))
(setq prefix (getstring "\nPrefix: "))
(setq suffix (getstring "\nSuffix: "))
(setq padLen (getint "\nNumber padding (0=none) <0>: "))
(if (null padLen) (setq padLen 0))
(setq layerName (getstring "\nLayer name <INCNUM>: "))
(if (= layerName "") (setq layerName "INCNUM"))
(if (not (tblsearch "LAYER" layerName))
(command "_.LAYER" "_Make" layerName "")
)
(initget "Text MText")
(setq useMtext (getkword "\nType [Text/MText] <Text>: "))
(if (= useMtext "MText") (setq useMtext T) (setq useMtext nil))
(initget "Yes No")
(setq useCircle (getkword "\nCircle around text? [Yes/No] <No>: "))
(if (= useCircle "Yes")
(progn
(setq useCircle T)
(setq radius (getreal "\nCircle radius: "))
)
(setq useCircle nil)
)
(if (= mode "Numbers")
(progn
(setq start (getint "\nStart number <1>: "))
(if (null start) (setq start 1))
(setq step (getint "\nStep <1>: "))
(if (null step) (setq step 1))
(setq val start)
)
(progn
(setq val (getstring "\nStart letters <A>: "))
(if (= val "") (setq val "A"))
(setq val (strcase val))
)
)
(prompt "\nClick points to place labels...")
(while (setq pt (getpoint "\nPick point: "))
(setq txt
(strcat prefix
(if (= mode "Numbers")
(if (> padLen 0)
(pad val padLen)
(itoa val))
val)
suffix))
(if (not useMtext)
(entmake
(list
'(0 . "TEXT")
(cons 8 layerName)
(cons 10 pt)
(cons 11 pt)
(cons 40 txtHeight)
(cons 1 txt)
(cons 50 (* pi (/ rot 180.0)))
(cons 7 (getvar "TEXTSTYLE"))
'(72 . 1)
'(73 . 2)
)
)
(entmake
(list
'(0 . "MTEXT")
(cons 8 layerName)
(cons 10 pt)
(cons 40 txtHeight)
(cons 1 txt)
(cons 50 (* pi (/ rot 180.0)))
)
)
)
(if useCircle
(entmake
(list
'(0 . "CIRCLE")
(cons 8 layerName)
(cons 10 pt)
(cons 40 radius)
)
)
)
(if (= mode "Numbers")
(setq val (+ val step))
(setq val (alpha-next val))
)
)
(setvar "CMDECHO" oldEcho)
(princ "\nDone.")
(princ)
)
FAQ
Can I continue numbering from a previous session?
Yes. Start the command and input the last used value manually. The script will continue from there.
Does this work with annotative text?
Yes, but you need to ensure your current text style is annotative before running the command.
Can I modify it for blocks instead of text?
Yes. Replace the TEXT/MTEXT creation with a block insertion (INSERT) routine. This is common for equipment tags.
What happens if I press ESC mid-command?
The script exits cleanly and restores system variables like CMDECHO.
Is this better than using fields or attributes?
Different use case. Fields and attributes are tied to objects or blocks. INCNUM is faster for free placement sequential labeling.
Can I use this in BricsCAD or GstarCAD?
Yes. Both support AutoLISP, and this script runs without modification in most cases.
SEO Keywords for Reference
- AutoCAD Incremental Numbering LISP
- AutoLISP sequential text script
- AutoCAD automation tools 2026
- Labeling grid lines AutoCAD LISP
- Automate parking space numbering CAD
- Free AutoCAD LISP download
Expert Tip: To make this tool even more accessible, add it to your Startup Suite in the APPLOAD menu so that the INCNUM command is available every time you open a new drawing.

