• 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

ATTPULL & ATTPUSH LISP: Batch Attribute Extract and Edit

August 3, 2026

ATTPULL reads attribute values out of every drawing in a folder and builds an Excel workbook from them. ATTPUSH writes new values back into every drawing in a folder. No drawing is opened in the editor — a hundred files are processed in the time it takes to open one.

What AttHarvest does

This is the door schedule pulled straight from the door blocks, the room data sheet built from the room tags, and the revision number pushed into every title block on the project at once.

ATTPULL — extracting. Name the blocks you want, either by typing the name or by picking one on screen, and choose which of their tags to extract: all of them, or a specific list in a specific order. Block insertion coordinates can be included as an extra column, which turns the extract into a setting-out schedule.

The result opens in Excel in one of three layouts. Group by filename gives one section per drawing with each block listed under it — best for reviewing drawings one at a time. Group by block merges the same data across every drawing and groups by block name instead — best for counting and comparing one symbol across a project. Drawing list mode gives a single flat table, one column per tag and one row per block, with the source drawing in its own column. That last one is a proper database table, and it is the one to choose if the result is going to be sorted, filtered or pivoted.

ATTPUSH — editing. Name one block, list the tags to change and the value each should be set to, and every matching block in every drawing is updated. Tags and their current values can be read straight off a block on screen, so building the list is a matter of picking rather than typing.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type ATTHARVEST to be asked which mode you want, or go straight to ATTPULL or ATTPUSH.
  3. Choose the folder of drawings to process.
  4. Name the block, by typing it or by picking one on screen.
  5. Choose the tags — all of them, or a specific list in a specific order.
  6. For ATTPULL, pick the layout and the extract opens in Excel. For ATTPUSH, give the value each tag should be set to and confirm.

How it works

Drawings are read and written through ObjectDBX, a database-only interface with no editor window, no regeneration and no view to set up. That is the whole reason a folder of a hundred files takes about as long as opening one.

A drawing already open in the current session is handled differently, through its live document object rather than ObjectDBX. This matters more than it sounds: ObjectDBX on an already-open file would read the version on disk and silently ignore unsaved work, and it would hold a second handle on a file somebody is editing. Detecting that case and routing around it is the difference between a reliable batch tool and one that occasionally loses an afternoon.

Both constant and ordinary attributes are read. Constant attributes live in the block definition rather than the insertion and are easy to miss entirely. A schedule that omits them is quietly incomplete — and quietly is the problem, because nothing on the output says anything is absent.

When a pushed value changes length, single-line attributes are re-anchored so that centred and right-justified text stays visually where it was instead of drifting sideways. Without that, changing a revision from A to AA nudges every title block on the project.

Drawings are only saved if something actually changed in them, so a run that matches nothing leaves every file’s timestamp alone — which keeps your backups and your issue records honest.

Notes and limits

  • Read this before running ATTPUSH. It modifies drawings and SAVES them without opening them, and there is no undo across files. Test on a copy of the folder first. Every time.
  • ATTPULL only reads, and is safe to run on anything.
  • Extraction requires Microsoft Excel to be installed. The workbook is built through Excel itself.
  • ObjectDBX will not touch a file that is open elsewhere — on another machine, or by another user on a network share. Close the drawings before a push.
  • Constant attributes can be read but not written. They belong to the block definition, so there is no per-insertion value for ATTPUSH to change.

Download and details

NameAttHarvest — extract and edit block attributes across a folder of drawings
DownloadAttHarvest.lsp — 96.1 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsATTHARVEST, ATTPULL, ATTPUSH
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 size96.1 KB, 2,086 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoNot needed — this routine only reads the drawing and changes nothing.
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

  • ATTCLONE LISP — match attribute formatting without touching any values
  • TAGTINT LISP — recolour chosen attribute tags across many blocks
  • 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