• 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

BLOCKRENAME LISP: Rename Blocks in Bulk from a List

August 6, 2026

BLOCKRENAME renames many blocks in one go, from a two-column file of old and new names. For bringing a drawing onto the office standard, or for tidying up after a consultant whose block names mean nothing to anyone else.

What BlockRename does

The file is plain text, one pair per line, comma separated:

DOOR1,D-SGL-900
DOOR2,D-SGL-1000
WIN-A,W-CSMT-600

Lines starting with a semicolon or a hash are ignored, so the file can carry notes.

Names can also be typed in a pair at a time, which suits a handful.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type BLOCKRENAME.
  3. Point it at your list file, or type pairs in.
  4. Read the report, then confirm.

How it works

Every rename is tested first and the whole list reported, because a half-applied rename is worse than none.

The old name must exist. A typo in the list otherwise passes silently and you find out later, on a drawing that is already half changed.

The new name must not already be taken by a different block.

A name cannot appear as both an old and a new name in the same list, which would make the result depend on the order things happened in.

Anonymous blocks are left alone. Those are the ones whose names begin with a star — hatches, dimensions, dynamic block variants — and they are AutoCAD’s to manage, not yours.

Notes and limits

  • Nothing is changed until the whole list checks out.
  • Comment lines start with ; or #.
  • Anonymous blocks are skipped.
  • One undo group covers the whole batch.

Download and details

NameBlockRename — rename blocks in bulk from a two-column list
DownloadBlockRename.lsp — 8.5 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandBLOCKRENAME
Requiresnothing beyond a CAD platform with AutoLISP.
Source size8.5 KB, 210 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoThe whole operation is wrapped in a single undo group, so one U reverses all of it.
CompatibilityAutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer.
AuthorYZ, August 2026
LicenceFree to use, supplied “as is” with no warranty.

References

  • BLOCKPROMOTE LISP — promoting nested blocks up a level
  • BLOCKTALLY LISP — counting what is in the drawing before you rename it
  • BLOCKPURGE LISP — clearing out what is left unused afterwards
  • More free AutoLISP routines on this site
  • Wisey’s Steel Shapes — free structural steel section drawing program

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