• 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

STRAYHUNT LISP: Find Objects at Absurd Coordinates

August 3, 2026

A drawing whose geometry sits millions of units from the origin behaves badly: snaps become unreliable, hatches fail, dimensions drift, and display artefacts appear at high zoom. STRAYHUNT finds the object causing it.

What StrayHunt does

Why it happens. Coordinate arithmetic is done in double precision, and the further from the origin you work, the fewer bits remain for the fractional part. Almost always the cause is not the drawing itself but one stray object — a point, a line, a piece of text — accidentally placed at some enormous coordinate, dragging the drawing extents out with it. ZOOM EXTENTS then zooms to a mostly empty rectangle and everything real becomes a dot.

Why this replaces a simple extents warning. Checking EXTMIN and EXTMAX and popping an alert tells you that you have a problem. It does not tell you which object causes it, and finding that by hand in a large drawing is genuinely difficult — the object is by definition somewhere you cannot see.

This examines every object individually, lists the offenders by type and layer with their coordinates, and offers to select them and zoom to them so you can deal with them.

STRAYHUNT finds and reports. STRAYCHECK is a silent check for loading at startup, printing a one-line warning only if there is something to report.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type STRAYHUNT when a drawing is behaving oddly, or ZOOM EXTENTS shows mostly empty space.
  3. Read the list of offenders — type, layer and coordinates.
  4. Accept the offer to select and zoom to them.
  5. Load STRAYCHECK at startup to be warned automatically.

How it works

StrayHunt:Limit is the distance from the origin beyond which an object is considered stray.

The default of 1e8 is deliberately generous. Real survey coordinates can legitimately reach the millions, and flagging those would make the tool useless on exactly the drawings that need it most — a site plan on a national grid is not broken, it is just a long way from zero.

Lower it if you work purely in local coordinates, where anything past a few thousand units is genuinely suspect.

Notes and limits

  • Tune the limit to how you work. 1e8 suits survey coordinates; lower it for local-coordinate drawing.
  • STRAYCHECK is the one to autoload. It is silent unless there is a problem.
  • It reports and navigates; it does not delete. Deciding what a stray object should become is yours.
  • It changes nothing, so there is no undo group.

Download and details

NameStrayHunt — find objects sitting at absurd coordinates, and go to them
DownloadStrayHunt.lsp — 11.6 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsSTRAYCHECK, STRAYHUNT
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size11.6 KB, 305 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

  • SPYGLASS LISP — inspect what the stray object actually is
  • STOPWATCH LISP — measure whether a drawing is slow, and where
  • STARTUPBUILD LISP — load STRAYCHECK automatically for every drawing
  • 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