TAGTOTAL totals the numeric values held in block attributes, grouped by attribute tag, and writes the results into an AutoCAD table. Quantities, weights, lengths, loadings — anything recorded as an attribute becomes a total without anyone opening a calculator.
What TagTotal does
Select a drawing full of attributed blocks and you get a schedule: each tag that holds numbers, and the sum of all its values.
Attributes whose values are not numeric are ignored, so descriptive tags like DESCRIPTION or ROOM_NAME simply do not appear.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
TAGTOTAL. - Select the attributed blocks.
- Pick an insertion point for the table.
- Rebuild the table if you later add or delete blocks — see below.
How it works
Constant attributes are included. GetAttributes returns only variable attributes, so GetConstantAttributes is called as well — otherwise a fixed value plainly visible in the drawing would be silently left out of the total, and a schedule that is quietly short is worse than one that is obviously wrong.
The totals are live by default. With TagTotal:UseFields set, the table cells contain field expressions referencing the attributes themselves, so editing any attribute value updates the table automatically.
The limits of that are worth knowing. The fields reference the specific attributes present when the table was built. Adding new blocks afterwards will not change the totals, and deleting a referenced block leaves a broken reference in the sum. Rebuild the table when the drawing’s content changes.
Set TagTotal:UseFields to nil for plain static numbers instead, which is the right choice if the schedule is being issued and should not move.
Notes and limits
- Live totals do not notice new blocks. Rebuild the table after adding to the drawing.
- Non-numeric attributes are ignored, which is what keeps the schedule readable.
- Constant attributes count, deliberately.
- Turn fields off for an issued schedule so the numbers cannot change under you.
Download and details
| Name | TagTotal — total attribute values by tag, into a table |
| Download | TagTotal.lsp — 17.7 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | TAGTOTAL |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com); nothing extra — the dialog is written to a temporary file at run time and deleted again, so there is no .dcl to install. |
| Source size | 17.7 KB, 466 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
- BLOCKTALLY LISP — counting blocks rather than totalling their values
- VALUETALLY LISP — another view of attribute values
- ATTPULL LISP — extract the values to Excel and total them there
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program