• 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

SHRINKWRAP LISP: Outline Any Selection of AutoCAD Objects

August 3, 2026

SHRINKWRAP generates closed polylines outlining any selection of objects — including text, blocks, hatches and dimensions, which the BOUNDARY command alone cannot trace.

What ShrinkWrap does

The usual reason for wanting this is to build a wipeout, a clipping boundary or a hatch region that follows the true silhouette of a group of objects rather than a crude rectangle around them.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type SHRINKWRAP.
  3. Select the objects to outline.
  4. Closed polylines are created following their silhouette.

How it works

The trick is to turn BOUNDARY inside out. The BOUNDARY command traces the empty space it is given a seed point in, and reports the islands it finds inside that space. This routine uses that to get an outline:

First it measures the overall bounding box of the selection, then draws a temporary rectangle a comfortable margin outside it. A BOUNDARY seed point is dropped in the gap between the rectangle and the objects — empty space that completely surrounds everything.

BOUNDARY traces that surrounding space and reports every island in it. Those islands are the outlines of the selected objects. Discard the one result matching the temporary rectangle’s own area, delete the rectangle, and what remains is the outline.

The view is zoomed to the temporary frame before BOUNDARY runs, and restored afterwards. That is not cosmetic: BOUNDARY only traces what is within the current view, so anything off screen would be silently missed — and a silhouette missing one object looks perfectly reasonable until you use it.

Notes and limits

  • The result is real closed polylines, ready to hatch, clip, offset or turn into a wipeout.
  • Text, blocks, hatches and dimensions are all outlined, which is exactly what BOUNDARY on its own will not do.
  • The view is zoomed and restored. If the screen jumps during the command, that is why.
  • One outline per island — a selection in two separate groups produces two polylines.

Download and details

NameShrinkWrap — generate closed polylines outlining any selection of objects
DownloadShrinkWrap.lsp — 11.4 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandSHRINKWRAP
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size11.4 KB, 272 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

  • ROUNDMASK LISP — wipeouts, which an outline is often built to become
  • HATCHCLEAR LISP — cutting hatch away from behind text
  • CORRAL LISP — select everything inside the outline you have just made
  • 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