LAYLENGTH – Sum Line & Polyline Length by Layer (Free AutoCAD LISP)

11th August 2026

FREE AUTOCAD LISP

LAYLENGTH — total line & polyline length per layer, in one table

Select your linework, pick a point, and LAYLENGTH inserts an AutoCAD table with the total length of every layer — pipes on one row, roads on another, each summed and sorted by layer name. No measuring one entity at a time, no calculator.

It measures true curve length — lines, polylines, arcs, circles, ellipses and splines all count for exactly what they are, not their straight-line approximation.

LAYLENGTH free AutoCAD LISP demo - selecting pipe linework and inserting a length-per-layer table

How to use it

  1. Unzip, then load the .lsp with APPLOAD.
  2. Type LAYLENGTH at the command line.
  3. Select the entities to measure – a window over everything works fine; anything that isn’t linework is filtered out automatically.
  4. Pick the table’s insertion point. Done – one row per layer, sorted alphabetically.

Good to know

Measures Lines, polylines, arcs, circles, ellipses and splines – true curve length
Output A native AutoCAD table – edit it, restyle it, export it with TABLEEXPORT
Text height Follows your current text style and the annotation scale, so the table comes in at a sensible size for the drawing
Undo The whole table is a single undo step
Command LAYLENGTH
Credit Written by Stefan M., one of the most talented LISP programmers out there – thank you, Stefan

Take it further — measure and split areas automatically

Area Measure for AutoCAD - product boxArea Measure add-on numbering AutoCAD polygons and inserting a totalled area table

Area Measure
Measure closed shapes in any unit, number them, and get a totalled area table – annotative text supported.

See Area Measure — $21.90

Divide Area for AutoCAD - product boxDivide Area add-on slicing an AutoCAD shape into equal strips

Divide Area
Split any closed shape into pieces of equal area – by number, by distance, a set area or a free cut.

See Divide Area — $21.90

Voronoi Generator for AutoCAD - product boxVoronoi Generator filling a closed AutoCAD polyline with organic cells

Voronoi Generator
Fill any closed polyline with Voronoi cells – exact spacing, edge distance and rounding, live preview.

See Voronoi Generator — $24.90

This tool is part of our free AutoCAD LISP collection — 20+ routines, all free, all tested on real projects.