VIZ LISP: Interpolate Vertex Elevations (Free AutoLISP Download)
VIZ calculates and labels the elevation at every intermediate vertex of a polyline when only the start and end elevations are known. It computes each intermediate value by linear interpolation, proportional to distance travelled along the polyline, and drops readable elevation text at every vertex.
VXINTERP-bgol (Interpolate Vertex Elevations)
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 linear-interpolation elevation utilities used in CAD/survey 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
VIZ calculates and labels the elevation at every intermediate vertex of a polyline when only the start and end elevations are known. It computes each intermediate value by linear interpolation, proportional to distance travelled along the polyline, and drops readable elevation text at every vertex.
How to Use
- Load
VXINTERP-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
VIZat the command line and press Enter. - Select the polyline you want to interpolate.
- Enter the known elevation at the start vertex when prompted.
- Enter the known elevation at the end vertex when prompted.
- Elevation text is created at every vertex (including both endpoints, for confirmation), interpolated proportionally to distance along the polyline, placed on a dedicated layer,
BGOL-VIZ(colour red).
Why Use It
- No manual arithmetic, removes the need to calculate every intermediate vertex's elevation by hand when only the two endpoints are known.
- One-step labeling, produces a full set of elevation labels along the entire polyline in a single command run, ready for further use.
- Accuracy, interpolation is calculated programmatically (true 2D distance-based proportion) rather than eyeballed, removing manual arithmetic error.
Where to Use It
- Generating formation-level or design-gradeline elevations along a polyline when only the start and end levels are defined (e.g. a straight-grade road segment, channel invert, or pipeline profile).
- Filling in intermediate elevation labels for a polyline representing a simplified linear feature (e.g. a proposed slope or ramp) between two known survey/design points.
- Any drafting task needing quick, consistent linear interpolation of elevation data along a multi-vertex line.
Notes
- Interpolation is distance-proportional along the polyline (not simply vertex-count-proportional), so unevenly spaced vertices are still interpolated correctly.
- Works on LWPOLYLINE entities; edit
BGOL:VIZ-Verticesin the .lsp if you need to support legacy 3D POLYLINE VERTEX sub-entities directly. - Text precision defaults to 3 decimal places via the
*bgol-viz-precision*constant near the top of the .lsp file. - 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
VIZ is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Interpolation is distance-proportional along the polyline (not simply vertex-count-proportional), so unevenly spaced vertices are still interpolated correctly.
No manual arithmetic, removes the need to calculate every intermediate vertex's elevation by hand when only the two endpoints are known.
Yes. VIZ 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 VXINTERP-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type VIZ 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.