• 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

DIMCENTRE LISP: Draw an Extension Line as a Centreline

August 6, 2026

When a dimension is taken to the centre of something — a hole, a column, a pipe, a road — the extension line on that side ought to be drawn as a centreline, not a continuous line. AutoCAD has no setting for it: extension lines take the dimension’s linetype and that is that.

What DimCentre does

DIMCENTRE suppresses the extension line and draws a centreline along exactly the same path, on the same layer, in the linetype you choose.

The dimension stays associative and keeps measuring. Only its appearance changes.

DIMCENTER is the same command spelled the other way, so it works whichever way your hands do.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type DIMCENTRE (or DIMCENTER).
  3. Pick the extension line you want turned into a centreline.
  4. Choose the linetype.

How it works

Finding the path. A linear dimension stores two definition points — the things being measured — and a point on the dimension line itself. The extension line runs from the definition point, square to the dimension line, until it crosses it and a little way beyond.

So the far end is where a line from the definition point at right angles to the dimension line meets a line through the dimension line point along it. The two gaps at either end come from the dimension style: DIMEXO is how far the extension line starts away from the thing measured, DIMEXE how far it runs past the dimension line. Both scale with DIMSCALE.

The extension line is suppressed with a style override, not by moving anything. Turning it off with DIMOVERRIDE of DIMSE1 or DIMSE2 leaves the definition points alone. Moving the definition point also hides the line, and edits the geometry the dimension measures from in order to change how it looks — which is how a dimension quietly stops reporting the thing it is pointing at.

The linetype loads from the right file. A metric drawing wants acadiso.lin, not acad.lin.

Notes and limits

  • The dimension stays associative and keeps measuring the geometry.
  • Rotated dimensions work.
  • Linear dimensions. Radial and angular ones have no comparable extension line.
  • One undo group covers the override and the centreline together.

Download and details

NameDimCentre — draw a dimension extension line as a centreline
DownloadDimCentre.lsp — 11.2 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsDIMCENTER, DIMCENTRE
Requiresnothing beyond a CAD platform with AutoLISP.
Source size11.2 KB, 244 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

  • CROSSHAIR LISP — centre-mark the circle the dimension points at
  • DIMNOTE LISP — standard notes on dimensions
  • Pen sizes and line types — the chain line convention a centreline should use
  • 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