• 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

Block Rename LISP Routine for AutoCAD (Auto Block Rename)

September 18, 2020

Last updated July 27, 2026

Auto Block Rename, by Steve Logan, is an AutoLISP routine for renaming blocks in bulk. Instead of picking through the RENAME command one block at a time, you give the routine a lookup list of old and new names and it works through the drawing renaming every block that matches. It was written in the DOS era of AutoCAD and shipped with batch files and a script so the same rename pass could be run across a whole set of drawings unattended.

Fair warning before you download: this is a vintage distribution. The zip was packed with a 1990s version of PKZip using compression methods (implode and shrink) that many modern extractors no longer support, so you may need 7-Zip or Info-ZIP’s unzip to open it — Windows Explorer will not. Everything below comes from reading the extracted source and README.

What it does

The file defines one command, ARENAME, written by Steve Logan in April 1990 and lightly revised in June 1991. It walks the drawing’s block table with tblnext and, for each block, asks a function called lookup_block whether that name has a replacement. Blocks not in your list are skipped, a name already equal to its replacement is left alone, and if the new name already exists as a block definition the routine prints a PROBLEM message and moves on rather than corrupting anything — a drawing cannot hold two block definitions under one name. Everything that survives those checks is renamed with AutoCAD’s own RENAME command.

The lookup_block function with your ("oldname" . "newname") pairs lives in a separate file, lookup.lsp — the README describes it as “where to put your OLDNAME newname list”. Note that lookup.lsp appears in the README’s file list but is not in the archive: you write it yourself. The header also warns that no new name should itself be a valid old name, or behaviour “could be unpredictable”; the routine ignores such pairs.

The interesting part is the packaging. ARENAME.SCR loads lookup.lsp and arename.lsp into a drawing opened from the DOS command line; DIRDWG.EXE generates a batch file with one acad drawing arename line per drawing in a folder (working around DOS AutoCAD refusing .dwg extensions on the command line); and ARENAME.BAT ties the two together so the rename pass ran across a whole directory of drawings unattended. That was how drawing offices handled block standard changes before modern batch tools existed. The README is blunt about the risk that carries: try it on sample drawings and verify the results before running it on important ones.

What is in the archive

  • README (2.3 KB) — the author’s notes; read this first. Its file list also names lookup.lsp, which is not included — you create it
  • ARENAME.LSP (1.7 KB) — the AutoLISP routine itself
  • ARENAME.SCR — an AutoCAD script file used in the batch workflow
  • ARENAME.BAT and ARENAME1.BAT — DOS batch files that drove the process
  • DIRDWG.EXE (8.8 KB) — a DOS-era helper executable

How to load it

For a single drawing: extract the archive, write your lookup.lsp defining the lookup_block function with your rename pairs, load lookup.lsp first, then load ARENAME.LSP. Load order matters twice over. The last line of ARENAME.LSP calls the command, so the rename pass starts the moment the file loads — have your list in place before you load it. And if lookup_block is missing, the routine prompts “Load lookup function…” and calls a loader helper of the author’s own (C:L) that is not in the archive either, so it will sit in that loop until a lookup function exists. The ARENAME command stays available for re-runs in the same session. There is a general walkthrough of loading LISP files on our AutoLISP guide.

Compatibility notes

  • The zip uses obsolete compression. If your extractor reports an unsupported method, try 7-Zip or a period-appropriate unzip utility.
  • The DOS batch workflow will not run as-is on modern 64-bit Windows, which no longer runs DOS programs. Treat the BAT files and DIRDWG.EXE as historical reference.
  • The LISP file itself is plain AutoLISP — no dialog boxes, no Express Tools calls, just block-table walking and the RENAME command. It was written for DOS-era AutoCAD; it may still load in current releases, but we have not tested it there.
  • AutoCAD LT only gained AutoLISP support in LT 2024. See what runs on AutoCAD LT before trying it on LT.

Download

Name: Auto Block Rename
Description: Routine to automatically, rename any block listed in “lookup_block”
in (“oldname” . “newname”) format. An error will occur if both
“oldname” and “newname” exist in the same drawing.
Type: AutoCAD AutoLISP Routine
Author: Steve Logan
File Size: 9 Kb
Cost: Free
Worked on: AutoCAD
Download File: Arenam.zip

Related routines

  • Block Count — count block insertions in a drawing
  • Fixblock — another block maintenance routine
  • Wblock All — write blocks out of a drawing in bulk

References

  • AutoLISP programming guide
  • Free LISP routine 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