STRINGTALLY counts how many times each distinct piece of text appears in a selection, and builds the result as a real AutoCAD table object in the drawing.
What StringTally does
Select everything annotated and you get a schedule: each unique string, and how many of them there are. Useful for counting door types, drainage symbols and fitting references — anything identified by its label rather than by its block name.
What it reads. Text and MText contribute their content. A multileader contributes its text. Attributed blocks contribute every attribute value, summed across the block.
Dimensions contribute only where the text has been manually overridden, since a measured dimension is not a label — counting them would fill the schedule with distances.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Set the table style you want — the result uses the current one.
- Type
STRINGTALLY. - Select the annotation to count.
- Pick an insertion point for the table.
How it works
MText longer than 250 characters is split by AutoCAD across several DXF entries, so groups 1 and 3 are concatenated to recover the whole string. Without that, a long note would be counted as a fragment, and two notes differing only past the 250th character would count as the same thing.
The table uses the current table style and is sized from that style’s own text height, so it matches the rest of the drawing’s tables rather than arriving at some arbitrary size.
Annotative text styles are handled by dividing through by the current annotation scale, so the table comes out right on an annotative drawing instead of being scaled twice.
Notes and limits
- Measured dimensions are not counted, only overridden ones — a deliberate distinction.
- Matching is exact. A trailing space or a different case makes two entries where you wanted one.
- Set the table style first. The result inherits it.
- One undo group covers the table.
Download and details
| Name | StringTally — count how often each distinct piece of text appears |
| Download | StringTally.lsp — 11.6 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | STRINGTALLY |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com). |
| Source size | 11.6 KB, 297 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
- STATETALLY LISP — counting dynamic blocks by visibility state
- BLOCKTALLY LISP — counting by block name, with previews
- WORDSWAP LISP — find and replace across the text you have just counted
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program