• 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

FASTENER LISP: Hex Nuts and Cap Screws in Side Elevation

August 6, 2026

FASTENER draws hexagon nuts, socket head cap screws and flat (countersunk) head cap screws in side elevation, at any angle, at any thread diameter, as ordinary lines and arcs. Nothing is inserted as a block, so a fastener can be trimmed into an assembly or edited member by member.

What FastenerKit does

Fastener head sizes are not a constant multiple of thread diameter. The published standards step the ratios as the diameter drops — a head on a 1/8″ screw is proportionally much larger than one on a 3/4″ screw. Drawing everything from a single multiplier gives small fasteners heads that are visibly too small.

So each dimension that steps is held as a lookup table of (threshold . ratio) pairs in ascending order, plus a default for anything larger than the biggest threshold.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type FASTENER.
  3. Choose the type, then give the thread diameter, the screw length where it applies, and the axis angle.
  4. Keep picking insertion points. Press Enter to finish.

How it works

The lookup walks up the table and takes the first threshold the thread diameter fits inside. Worked example, across-corners on a hexagon nut: a 0.35 diameter is not within 0.150, 0.170, 0.200, 0.260 or 0.340, but it is within 0.390 — so the ratio is 1.760 and the nut measures 0.35 × 1.760 across corners.

Every point is built with polar from the insertion point along the axis angle, which is what lets the whole fastener be drawn at any rotation without a single transformation.

The type, diameter, length and angle are remembered, so the next fastener needs only a pick point.

You keep picking until you press Enter. The original looped a fixed hundred times with no way out but Escape — which threw away the whole command.

Thread roots are drawn in HIDDEN. If that linetype is not loaded in the drawing the routine loads it from the standard linetype file; if it cannot, it says so once and draws those lines continuous rather than failing.

Notes and limits

  • Proportions are tabulated, not scaled from one multiplier.
  • Lines and arcs, not blocks — trim it into the assembly.
  • It repeats until you press Enter.
  • One undo group per fastener.

Download and details

NameFastenerKit — draw hex nuts and cap screws to published proportions
DownloadFastenerKit.lsp — 16.9 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandFASTENER
Requiresnothing beyond a CAD platform with AutoLISP.
Source size16.9 KB, 390 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

  • BOLTS LISP — eleven metric fastener commands, drawn as blocks
  • THREAD LISP — the thread profile itself
  • MACHFEAT LISP — the holes they go into
  • 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