• 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

BRACKET LISP: Draw a Bracket Around a Group of Notes

August 6, 2026

BRACKET draws the tall bracket used to gather several lines of text and point them at one thing — a group of notes against a leader, a schedule of parts against an item, a set of options against a single answer.

What TextBracket does

Pick the two ends of the span and say how far it should reach. Corners can be square, chamfered or rounded.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type BRACKET.
  3. Pick the two ends of the span.
  4. Give the reach, and choose square, chamfered or rounded corners.

How it works

The polyline width is read with SETVAR, directly, rather than by opening the PLINE command to see what it says.

That is worth spelling out, because the original tried to do it with (command "pline" pt1 ^C), where ^C was meant as a cancel. That works in a menu macro, where ^C is two characters the menu system reads as Escape — but in LISP it is a symbol named ^C, which is unbound, evaluates to nil, and leaves PLINE open at a prompt.

The same confusion ended its polylines with \r, which is likewise a symbol rather than a carriage return. It happened to work, because an unbound symbol is nil and nil closes a command — but only by luck.

Corners are drawn, not filleted into place. Setting FILLETRAD, CHAMFERA and CHAMFERB to get a corner shape leaves all three at the new values for whatever you draw next.

No variable is named ANGLE. A global by that name shadows the built-in angle function for everything that runs afterwards in the session.

Notes and limits

  • Three corner treatments — square, chamfered, rounded.
  • System variables are left alone.
  • Drawn as one polyline, so it can be offset or stretched with the notes.
  • One undo group covers the bracket.

Download and details

NameTextBracket — draw a bracket around a group of notes
DownloadTextBracket.lsp — 8.3 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandBRACKET
Requiresnothing beyond a CAD platform with AutoLISP.
Source size8.3 KB, 185 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

  • TEXTFRAME LISP — boxing text rather than bracketing it
  • RESPACE LISP — evening up the notes inside it
  • DIMNOTE LISP — notes hung off a dimension
  • 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