LM-LEGEND
Builds a legend from the layer table in the active drawing. Sorts by layer, pulls linetype and colour, and lays it out at your chosen scale — no retyping, no drift.
CoreAutoLisp · Civil CAD · 2019–present
A growing suite of AutoLisp routines for civil designers who are tired of rebuilding the same legends, labels, and linework by hand. One command where there used to be forty clicks.
I'm a civil CAD designer who got tired of the same drafting chore every single project: the legend. The one that has to match the sheet, match the layer standard, and get redrawn when the client changes a pipe size. So I started writing AutoLisp to do it for me.
Legend Manager is the result — a collection of routines I use daily on real road, drainage, and site plans, now packaged so other designers can drop them straight into their own workflow.
Because it ships inside the drawing. No external app, no plugin store, no subscription. The routines live in a single .lsp file you APPLOAD and forget about — they're just there, in every session, on every machine that opens your drawings.
"The legend used to take me an afternoon. Now it's one command and a coffee."
— a drainage designer, on the match-line routine
v2.4 of the core suite is in testing — the new LegendSync routine keeps legends in step with layer renames across a whole sheet set. Roadmap: a pipe-run labeler that reads alignment geometry directly.
Each one solves a specific drafting pain. Load the whole suite, or cherry-pick the ones you need.
LM-LEGENDBuilds a legend from the layer table in the active drawing. Sorts by layer, pulls linetype and colour, and lays it out at your chosen scale — no retyping, no drift.
CoreLM-MATCHLINEDraws a match line with the sheet reference, north arrow, and "CONTINUED ON SHEET" label in a single command. Handles the sheet-numbering logic for you.
CoreLM-TEXTFIXScans a selection for text height, style, and layer mismatches against your standard, and fixes them in one pass. The pre-plot sanity check you forgot you needed.
UtilityLM-CLEANDeletes duplicate entities, merges overlapping lines, and purges orphaned layers and blocks. Runs quietly in the background while you keep drafting.
UtilityLM-LEGENDSYNCNew in v2.4. Keeps every legend in a sheet set in step with layer renames — rename once, all legends update. Currently in testing.
BetaLM-PIPELABELLabels pipe runs from alignment geometry — size, material, invert level — placed and rotated to the run. On the roadmap for the next release.
RoadmapDrag the band sideways. Each card is a real project the routines were built against.
Match lines and sheet references across a 14-sheet plan set. LM-MATCHLINE cut the layout time from a day to an afternoon.
Pipe labels and legend sync across a 40-inlet network. LM-LEGEND kept the legend honest as layers got renamed mid-project.
Spot elevations and a clean legend from a messy inherited file. LM-CLEAN purged 600 orphaned layers before plotting.
Text style standardisation across a multi-discipline set. LM-TEXTFIX normalised heights and styles in one pass.
Match lines, north arrows, and legend from the layer table — the full suite working together on a tight deadline.
Short notes on the routines, the CAD life, and what's next.
Every civil project has one, nobody enjoys building it, and it's almost pure data transformation — layer table in, clean legend out. It's the ideal thing to automate first because it's boring enough that you'll never want to do it by hand again.
The whole point of AutoLisp is that it lives inside the drawing. I keep the suite in one file, load it at startup, and never think about it again. That's the bar every routine has to clear — if it's more effort to run than to do by hand, it's not worth shipping.
Rename a layer in a 20-sheet set and every legend quietly goes stale. LegendSync watches the layer table and updates all legends in the set at once. It's the routine I wish I'd had three years ago.
The core suite is free to try. Send a note and I'll point you to the download and the docs.