• 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

BASESNAP LISP: Justify Block Base Points to a Corner

August 3, 2026

Blocks inherited from elsewhere routinely have their base point somewhere arbitrary, so they never snap where you want them. BASESNAP puts it on a corner or the middle of the block’s own bounding box, chosen from a nine-point grid exactly like text justification — for any number of blocks at once.

What BaseSnap does

Pick the justification from the grid, pick the blocks, and every selected block definition has its base point moved to that position on its own extents. Bottom-left, centre, top-right and the six in between.

Two methods, and the difference matters. Retain visual position moves every reference to compensate, so nothing appears to shift and the insertion coordinates change instead — usually what you want. Retain insertion point position keeps the coordinates and lets the geometry swing around them, which is what you need when blocks sit at meaningful coordinates like survey points or grid intersections.

Your choice of justification and method is remembered between sessions.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type BASESNAP.
  3. Pick the justification point from the nine-point grid.
  4. Choose the method — retain visual position, or retain insertion coordinates.
  5. Select the blocks. Any number, and they need not be the same block.
  6. If you undo afterwards, run REGEN — see the note below.

How it works

Text, MText and attribute definitions are deliberately excluded from the measurement. A block’s label often extends well beyond its geometry, and including it would put the “bottom-left” corner somewhere in empty space below the drawing. Only real geometry counts, which is what makes the result match where you would have put the base point by eye.

Nested blocks are measured properly, by recursing into them and transforming the result by each nesting level’s placement. A block containing a rotated, scaled sub-block still gets an accurate bounding box.

Attributed blocks get an ATTSYNC afterwards, so their attributes follow the new base point instead of staying where they were and drifting away from the block that owns them.

Notes and limits

  • After an undo, run REGEN. The change is undone correctly but the display does not refresh on its own, so the drawing looks unchanged until you regenerate.
  • Choose the method deliberately. Retaining the visual position changes the insertion coordinates; retaining the coordinates moves the geometry.
  • The box is the geometry, not the label. If a block looks like it justified to the wrong place, check whether you were expecting the text to be included — it is not.
  • It changes block definitions, so every reference of each selected block is affected.

Download and details

NameBaseSnap — justify block base points to a corner or centre
DownloadBaseSnap.lsp — 27.4 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandBASESNAP
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 size27.4 KB, 658 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

  • BASEPIN LISP — move a base point to a picked point rather than a corner
  • BSCALE LISP — scale blocks about their own insertion point
  • 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