• 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

HIDESECTION LISP: Break an Object and Hide the Middle

August 3, 2026

HIDESECTION breaks an object at two points and puts the middle section on a hidden layer, showing concealed detail in one operation. Done by hand this is genuinely tedious: break the object twice, hunt for the middle fragment, select it, change its properties.

What HideSection does

Worse, a circle or full ellipse cannot be broken at a single point at all, so the hidden portion has to be redrawn from scratch. This handles all of it.

Two commands. HIDESECTION takes the object and then two break points. HIDESECTIONAT takes the object and then a second object that crosses it, using the two intersections either side of where you picked.

HIDESECTIONAT is usually the one you want: pick the pipe where it passes behind the wall, pick the wall, and the crossing section is hidden exactly at the wall faces — no snapping to intersections, no guessing.

Works with lines, arcs, circles, ellipses, elliptical arcs and polylines, including polylines with varying width and arc segments, in any UCS.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type HIDESECTION or HIDESECTIONAT.
  3. Pick the object on the part that should be hidden — not on the part that stays visible. See below.
  4. For HIDESECTION, pick the two break points. For HIDESECTIONAT, pick the crossing object.

How it works

Where you pick the object matters. The point at which you select it identifies which of the three resulting pieces is the hidden one. Pick on the part that should be hidden, not on the part that stays visible. This is the one thing to get right, and it is the difference between hiding the pipe behind the wall and hiding everything except it.

The hidden properties are configurable. HideSection:Properties in the file lists what is applied to the hidden section. Delete a line to leave that property inherited from the original object — so removing the colour line means the hidden portion keeps the original’s colour and only changes layer.

That matters on a drawing where colour carries meaning: you want the concealed pipe to still read as a pipe, just hidden.

Notes and limits

  • Pick on the part to hide. That pick point chooses the middle piece.
  • Circles and full ellipses are handled, which is the case that cannot be done with plain BREAK.
  • Configure the properties once in HideSection:Properties; delete any line to inherit that property instead.
  • The hidden layer should carry a hidden linetype. The routine moves the geometry; your layer standard supplies the appearance.

Download and details

NameHideSection — break an object and put the middle section on a hidden layer
DownloadHideSection.lsp — 30.6 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsHIDESECTION, HIDESECTIONAT
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size30.6 KB, 689 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

  • BLOCKNOTCH LISP — cut a gap around a block rather than hiding a span
  • Pen sizes and line types — the hidden linetype convention this relies on
  • 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