• 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

BLOCKLOCATE LISP: Find Every Insertion of a Block

August 6, 2026

BLOCKLOCATE answers “where are all the manholes?” on a drawing too big to see at once. Name a block, or pick one, and every insertion of it is found and shown.

What BlockLocate does

Three ways to look at the answer. Rays draws temporary lines from a point you pick out to every insertion, so the whole spread is visible in one glance. Step zooms to each insertion in turn, pressing Enter to advance. List gives a coordinate table on the text screen.

None of them change the drawing. The rays are temporary vectors that clear on the next redraw, and stepping only moves the view.

Why not just QSELECT? It will select them, which tells you how many and puts grips on them — but on a site plan a mile across, grips you cannot see are no help. This is about finding out where they are.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type BLOCKLOCATE.
  3. Name the block, or pick one on screen.
  4. Choose Rays, Step or List.
  5. For Rays, pick the point they radiate from — somewhere you can see.

How it works

Telling an xref from a block takes two tests, and either one alone lets something through. Both are INSERT entities as far as the drawing database is concerned.

An xref’s block table record carries a path in group 1, and a nested xref’s name contains a pipe character. The routine checks both, because a nested xref has no path of its own and a top-level one has no pipe.

Anonymous blocks are excluded too — hatch patterns, dimensions and dynamic block variants, all named *U or *D followed by a number. They are not things anyone goes looking for, and a list full of them buries the answer.

Notes and limits

  • Nothing is modified, so there is no undo group. The rays are temporary vectors, not objects.
  • Rays clear on the next redraw. That is intended — they are a look, not a drawing.
  • Xrefs and anonymous blocks are excluded deliberately.
  • Step moves the view only. Nothing is selected or changed.

Download and details

NameBlockLocate — find and show every insertion of a block
DownloadBlockLocate.lsp — 9.9 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandBLOCKLOCATE
Requiresnothing beyond a CAD platform with AutoLISP.
Source size9.9 KB, 232 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

  • BLOCKTALLY LISP — how many there are, as a schedule
  • DEEPCOUNT LISP — counting that follows nesting
  • STRAYHUNT LISP — finding objects at absurd coordinates
  • 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