STATETALLY counts blocks — and, crucially, breaks dynamic blocks down by visibility state rather than lumping them together under one name.
What StateTally does
That is what makes it different from an ordinary block count. A single dynamic block definition called DOOR might appear in the drawing as single doors, double doors and fire doors, all sharing one block name. A plain count reports DOOR ... 47 and tells you nothing useful. This reports:
DOOR ................................. 47
Single .............................. 31
Double .............................. 12
Fire ................................. 4
which is a schedule you can actually order from.
Results print to the text window and can be written to a TXT or CSV file, created alongside the drawing and named after it, then opened automatically.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Go to the layout you want counted — only the current one is included.
- Type
STATETALLY. - Read the breakdown, or send it to a TXT or CSV file.
How it works
Standard blocks and xrefs are counted normally. Only dynamic blocks that genuinely have a Visibility Parameter get the breakdown — a dynamic block with stretch or flip parameters but no visibility states is reported as one line, which is correct, because there is nothing to distinguish its instances by.
That distinction is what stops the report becoming noise. Breaking every dynamic block down regardless would produce a schedule full of one-line sub-entries that mean nothing.
Notes and limits
- Only the current layout is counted — model space when in model space, the active sheet when in paper space.
- Only blocks with a Visibility Parameter are broken down. Other dynamic blocks report as a single line.
- The output file is named after the drawing and opens automatically.
- It only reads the drawing, so there is no undo group.
Download and details
| Name | StateTally — count blocks by name and by visibility state |
| Download | StateTally.lsp — 15.8 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | STATETALLY |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com). |
| Source size | 15.8 KB, 361 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | Not needed — this routine only reads the drawing and changes nothing. |
| 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
- BLOCKTALLY LISP — a full schedule with block previews, drawing-wide
- DEEPCOUNT LISP — counting that follows nesting
- STRINGTALLY LISP — counting by label rather than by block name
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program