Last updated July 28, 2026
WBLKALL writes every block definition in the current drawing out to its own DWG file in one pass. Instead of running WBLOCK once per block and typing each name, you run one command and walk away. It was written in 1993 by Chris Bryant, and for a file this old it is unusually tidy code: it declares its local variables, saves the EXPERT system variable before changing it and puts it back afterwards, and skips anonymous blocks (the ones whose names start with an asterisk, created by hatches and associative dimensions) so you do not end up with a folder full of drawing fragments.
It suits anyone breaking a legacy drawing apart into a block library, or auditing what a drawing you have been handed actually contains. There is one significant bug to know about before you run it, covered below.
What it does in practice
The routine walks the drawing’s block table with tblnext, builds a list of every block name it finds, and then works through that list calling AutoCAD’s WBLOCK command on each one. Files land in whatever directory AutoCAD currently considers current, so set that deliberately before you start. It prints a dot for each block as it goes and finishes with “WBlocking complete.”
Two behaviours come from its DOS-era origins. If a block name is longer than eight characters, the routine stops and asks you for a replacement name of eight characters or fewer, refusing anything longer or empty until you comply. That was the FAT filename limit in 1993; it has not applied for a very long time, but the check is hard-coded, so on a modern drawing with descriptive block names you will be answering that prompt a lot. And it raises EXPERT to 4 while it runs, which suppresses the confirmation prompts WBLOCK would otherwise raise, then restores your original value at the end.
The overwrite prompt does not work
The header promises that “if a .DWG file with the same name already exists, WBLKALL will ask permission first before overwriting”. It does ask. It then ignores your answer, and never overwrites.
The prompt is set up with (initget 1 "Yes No") and read with getkword, which returns the whole keyword as it was defined — “Yes” or “No” — regardless of whether you typed the full word or just the letter. The line that acts on it tests for the single character “Y”, which getkword can never return. The test is always false, so an existing file is silently skipped whichever way you answer.
In practice this fails safe: nothing of yours gets clobbered. But it means a second run into the same folder writes nothing at all for blocks you have already exported, which looks like the routine has stopped working. If you want a genuine re-export, delete or move the previous files first, or change that one comparison to test for “Yes”. The permission notice on the file allows modification.
Worth knowing too: the existence check opens each candidate file for reading and never closes it. AutoCAD allows a limited number of open files at once, so on a drawing with a great many blocks exported into a folder that already holds matching DWGs, you may run out of file handles partway through.
Command reference
The file defines a single command, WBLKALL. Note that the file inside the download is named WBLKAL.LSP, with one L, while the command has two. It announces itself when it loads.
How to load it
Wblkall.zip is a 1993 PKZip archive using compression methods Windows Explorer cannot read — if double-clicking it shows an empty or broken archive, that is why. 7-Zip or Info-ZIP’s unzip will open it. Extract WBLKAL.LSP, then load it with APPLOAD. Set your working directory first, since that is where every exported DWG will land. Our AutoLISP guide covers loading in more detail.
Step-by-step usage
- Open the drawing you want to break apart and make sure AutoCAD’s current directory is where you want the DWG files written.
- Type WBLKALL. It reports “Building block list …” then “Writing blocks .” and prints a dot per block.
- If a block name is longer than eight characters it stops with “Block name name is too long.” and asks for a new one. Type a name of eight characters or fewer; blank or over-length answers are rejected with “Invalid response.”
- If a matching DWG already exists you will be asked whether to replace it. As explained above, the file is skipped either way.
- It finishes with “WBlocking complete.” and restores your EXPERT setting.
Compatibility notes
Written in 1993, so we say written for rather than tested on. It is plain AutoLISP — no dialog boxes, no Express Tools functions — driving AutoCAD’s own WBLOCK command through command, so there is nothing in it that requires full AutoCAD. AutoCAD LT gained AutoLISP in LT 2024, so LT users on 2024 or later can try it; see what runs on AutoCAD LT. Because it writes files in bulk, point it at an empty folder the first time and see what comes out.
Download
| Name: | WBLKALL |
| Description: | This program WBLOCKs all block definitions in a drawing. Features include: 1. Writes the block to the current directory. 2. Prompts user for new name if the block name is more than 8 characters long. 3. If a .DWG file with the same name already exists, WBLKALL will ask permission first before overwriting. |
| Type: | AutoCAD AutoLISP Routine |
| Author: | Chris Bryant |
| File Size: | 2 Kb |
| Cost: | Free |
| Worked on: | AutoCAD |
| Download File: | Wblkall.zip |
Related routines
- Block Count — find out how many of each block a drawing holds before you export them.
- Auto Block Rename — bulk rename block definitions to a naming standard.
- Fixblock — another block maintenance routine worth keeping alongside.