• 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

SHEETFILL LISP: Fill Title Blocks From a CSV Register

August 3, 2026

Keep one spreadsheet listing every drawing in the job and what its title block should say. SHEETFILL makes the current drawing find its own row and update itself. Run it on every drawing and the whole set is consistent with the register — which is the only way a drawing list and a set of sheets ever stay in step.

What SheetFill does

The CSV format. The first row is headings, and every heading after the fixed columns is an attribute tag. Each subsequent row is one drawing:

DWG      Layout    TITLE           REV   DATE
A-101     Sheet 1   GROUND FLOOR    C     2026-08-01
A-101     Sheet 2   FIRST FLOOR     C     2026-08-01
A-102     Sheet 1   SECTIONS         B     2026-07-22

Column one is the drawing name, with or without its extension. The optional Layout and Block Name columns follow it — two rows for one drawing, as above, let each layout carry different information.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Set SheetFill:BlockFilter to your title block name — see the warning below.
  3. Set SheetFill:CsvPath to a fixed location, or leave it nil to be prompted.
  4. Set SheetFill:HasLayout and SheetFill:HasBlockName to match your CSV’s columns.
  5. Type SHEETFILL.

How it works

The drawing matches itself to a row by name, then writes each remaining column into the attribute whose tag matches that column’s heading. Nothing has to be mapped — the heading is the tag.

Running it automatically. Load the file from acaddoc.lsp with SheetFill:AutoRun set and every drawing updates itself as it opens.

That autorun is conditional on a fixed CSV path being configured, and deliberately so. Without a path, opening any drawing at all would pop a file dialog — which is what the original’s unconditional autorun did. Making it conditional is the difference between a useful automation and one you disable within a day.

Notes and limits

  • Without a block filter this updates every attributed block whose tags match a CSV heading — not only title blocks. If your drawings use a tag like REV on other blocks too, set SheetFill:BlockFilter to something like "*BORDER" first.
  • Autorun needs a fixed CSV path. It is skipped otherwise, on purpose.
  • Two rows with the same drawing name and different Layout values is how one drawing carries different data per sheet.
  • The drawing name may include the extension or not. Both match.

Download and details

NameSheetFill — fill title block attributes from a CSV, matched on drawing name
DownloadSheetFill.lsp — 18.8 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandSHEETFILL
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size18.8 KB, 447 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

  • ATTPULL and ATTPUSH LISP — build the CSV from the drawings, or push values back
  • SHEETNUMBER LISP — renumber the layouts the register refers to
  • Title block standards — what the fields you are filling are actually for
  • 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