SGL LISP: Label Every Segment Length (Free AutoLISP Download)
SGL measures and labels the length of every individual segment of a selected polyline in a single command. Each label is rotated to align with its segment's direction and stays right-side-up, giving a clean, professional annotation style suited for survey boundaries, site plans, and similar deliverables.
SEGLEN-bgol (Label Every Segment Length)
Command Type: AutoLISP routine (works in AutoCAD, BricsCAD, ZWCAD and most AutoLISP-compatible CAD platforms)
Developed by: BGol Community, bgol.in
Inspired by the general concept of segment-length labeling utilities used in survey/civil drafting. This is an original, independently written routine, new file name, new command name, new source code, created so the CAD community has a free, editable, open-source alternative.
Overview
SGL measures and labels the length of every individual segment of a selected polyline in a single command. Each label is rotated to align with its segment's direction and stays right-side-up, giving a clean, professional annotation style suited for survey boundaries, site plans, and similar deliverables.
How to Use
- Load
SEGLEN-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
SGLat the command line and press Enter. - Select the polyline whose segments you want labeled (e.g., a survey boundary).
- A length label is placed at the midpoint of every segment, rotated to match that segment's direction, on a dedicated layer,
BGOL-SGL(colour green). - Closed polylines also get their closing segment labeled.
Why Use It
- Labels every side of a boundary/polyline in one command instead of manually measuring and placing text for each segment individually.
- Segment-aligned, always-upright label rotation keeps the drawing clean and readable.
- Standard, repeatable output format suitable for land survey boundary descriptions, site plans, and similar deliverables.
Where to Use It
- Labeling the length of every side of a land parcel or survey boundary polyline for a site plan or legal description drawing.
- Any drafting task requiring quick, consistent length annotation of every segment in a multi-segment polyline (building outlines, plot boundaries, alignment segments).
- Speeding up production of survey deliverables where segment-by-segment dimensioning is a standard requirement.
Notes
- Text rotation is normalized so labels never render upside-down, segment angles between 90 and 270 degrees are flipped 180 degrees for readability.
- Length values use the drawing's current linear unit precision style; edit the
2in(rtos seglen 2 2)inside the .lsp to change decimal places. - Source code is fully open, feel free to study, modify, and redistribute it under the same open, free-for-all spirit.
Credits
Developed and shared for the CAD community by BGol Community. Website: https://bgol.in/ Free and open-source, use it, modify it, share it, for personal or commercial work alike.
Frequently Asked Questions
SGL is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Text rotation is normalized so labels never render upside-down, segment angles between 90 and 270 degrees are flipped 180 degrees for readability.
Labels every side of a boundary/polyline in one command instead of manually measuring and placing text for each segment individually.
Yes. SGL is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.
Drag and drop SEGLEN-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type SGL at the command line to run it.
๐ค About BGol Community
BGol Community of Advanced Surveying builds and shares free, open-source tools for the survey and CAD drafting community.
๐ Made with โค๏ธ by BGol Community of Advanced Surveying
Free, open-source, and built for the CAD community, for personal or commercial use, always.