Homeโ€บ Blogโ€บ PDIST LISP: Distance Along a Polyline Free Download
๐Ÿ“ LISP

PDIST LISP: Distance Along a Polyline Free Download

๐Ÿงฎ 2  |  ๐ŸŸข 2
20 Feb 2026 Trishunya Team
PDIST LISP: Distance Along a Polyline Free Download
๐Ÿ“ LISP · CAD UTILITIES

PDIST LISP: Distance Along a Polyline (Free AutoLISP Download)

๐Ÿ“… 20 Feb 2026 ๐Ÿท๏ธ CAD BGBgol Global
PDIST AutoLISP routine, Distance Along a Polyline, shown inside a CAD window

PDIST measures the true distance along a polyline between two points that both lie on it, instead of the straight-line distance between them, without trimming, duplicating, or otherwise modifying the original polyline. It correctly handles polylines containing arc segments, and also labels each intermediate vertex-to-vertex segment length so you can cross-check the total.

PLDIST-bgol (Distance Along a Polyline)

CATEGORY
Land Survey Lisps
COMMAND NAME
PDIST
LISP FILE
PLDIST-bgol.lsp
LICENSE
Open-source, free

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 "distance along a path" measuring utilities used in survey and alignment 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

PDIST measures the true distance along a polyline between two points that both lie on it, instead of the straight-line distance between them, without trimming, duplicating, or otherwise modifying the original polyline. It correctly handles polylines containing arc segments, and also labels each intermediate vertex-to-vertex segment length so you can cross-check the total.

How to Use

  1. Load PLDIST-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type PDIST at the command line and press Enter.
  3. Select the polyline you want to measure along.
  4. Pick (or snap near) a Start Point and an End Point, they don't need to be actual vertices, any point along the polyline path works.
  5. The routine reports the total path distance between the two points, labels each individual segment length between intermediate vertices along that span, and places a total-distance label at the midpoint, all on layer BGOL-PDIST.

Why Use It

  • No trim-and-measure workaround, one command gives the true path distance directly, without duplicating or trimming the polyline.
  • Handles arcs correctly, uses curve-parameter functions, so arc segments in the polyline are measured accurately, unlike a simple straight-line calculation.
  • Built-in QA, per-segment length labels let you cross-check the total and see exactly which segment contributes what distance.
  • Non-destructive, the original polyline is never modified.

Where to Use It

  • Measuring chainage / distance along a survey alignment, breakline, or pipeline route between two arbitrary points.
  • Verifying as-built lengths along a route without altering the original drawing geometry.
  • Any land-survey or infrastructure drafting task needing "distance along a path" rather than "straight-line distance."

Notes

  • Picked points are snapped to the nearest point on the curve via vlax-curve-getClosestPointTo, so slightly off-curve picks still work.
  • Segment breakdown labels are placed at the midpoint of each vertex-to-vertex span that falls between the two picked points.
  • 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

What CAD platforms does PDIST work on?

PDIST is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.

What should I know before using PDIST?

Picked points are snapped to the nearest point on the curve via vlax-curve-getClosestPointTo, so slightly off-curve picks still work.

What is the main benefit of using PDIST?

No trim-and-measure workaround, one command gives the true path distance directly, without duplicating or trimming the polyline.

Is PDIST free to use for commercial projects?

Yes. PDIST is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.

How do I load the PDIST command into my drawing?

Drag and drop PLDIST-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type PDIST 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.

Back to all articles