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
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
BLOCKRENAME. - Point it at your list file, or type pairs in.
- 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
| Name | BlockRename — rename blocks in bulk from a two-column list |
| Download | BlockRename.lsp — 8.5 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | BLOCKRENAME |
| Requires | nothing beyond a CAD platform with AutoLISP. |
| Source size | 8.5 KB, 210 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| Compatibility | AutoCAD (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. |
| Author | YZ, August 2026 |
| Licence | Free 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