CHAINAGE labels how far along you are at every vertex of a polyline — the running distance from the start, written beside each point. Roads, drains, kerb lines, fences, cable routes, section lines: anything measured from one end.
What Chainage does
Three ways of writing it. Distance is a plain running length — 0, 12.5, 31.75. Station is the surveyor’s form, metric in thousands — 0+000, 1+250.000. Imperial is the same idea in hundreds of feet — 0+00, 12+50.00.
A starting chainage can be given, so a length picked up part way along a route is labelled with its true position rather than starting at zero.
How to use it
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
CHAINAGE. - Pick the line, polyline, arc, spline or ellipse.
- Choose the label format and give a starting chainage if the run does not begin at zero.
How it works
Arc segments are measured properly. Adding up straight-line distances between vertices measures the chord rather than the arc, so on a polyline with any curve in it every label after the first bend is short — and increasingly so along the run.
Distances come from the curve itself through vlax-curve-getDistAtParam, which asks AutoCAD how far along the object a point actually is. It follows bulges exactly, and it behaves the same way on a line, an arc, a spline or an ellipse — so all of those can be labelled too, not just polylines.
Closed polylines keep their last segment. A run that stops at the final vertex without coming back to the start drops the closing length, which on a boundary is the one figure somebody will check.
Notes and limits
- Lightweight polylines work — which is worth saying, because everything AutoCAD has drawn by default since Release 14 is one.
- Arcs are measured along the curve, not chord to chord.
- Station format is in thousands, imperial in hundreds of feet.
- One undo group covers the whole run of labels.
Download and details
| Name | Chainage — label running distance at every vertex of a line |
| Download | Chainage.lsp — 11.3 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | CHAINAGE |
| Requires | the ActiveX layer (loaded automatically by the routine with vl-load-com). |
| Source size | 11.3 KB, 261 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| Compatibility | AutoCAD (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. |
| Author | YZ, August 2026 |
| Licence | Free to use, supplied “as is” with no warranty. |
References
- RUNLENGTH LISP — distance between two points along a chain
- SPANTAG LISP — label each object with its own length
- TRACKTEXT LISP — slide labels along the curve afterwards
- More free AutoLISP routines on this site
- Wisey’s Steel Shapes — free structural steel section drawing program