• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

TAGTOTAL LISP: Total Attribute Values Into an AutoCAD Table

August 3, 2026

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

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type TAGTOTAL.
  3. Select the attributed blocks.
  4. Pick an insertion point for the table.
  5. 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

NameTagTotal — total attribute values by tag, into a table
DownloadTagTotal.lsp — 17.7 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandTAGTOTAL
Requiresthe 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 size17.7 KB, 466 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoThe whole operation is wrapped in a single undo group, so one U reverses all of it.
CompatibilityAutoCAD (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.
AuthorYZ, August 2026
LicenceFree 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

Filed Under: AutoLISP Routines

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in