ZMK LISP: Mark Z Value at Each Vertex (Free AutoLISP Download)
ZMK labels every vertex of one or more selected 3D polylines with a text callout showing that vertex's Z (elevation) value. 3D polylines are preferred over 2D polylines in infrastructure projects because each vertex carries its own elevation, but reading those values normally means using the LIST command or walking the Properties panel vertex-by-vertex. ZMK automates that entirely.
VXZMARK-bgol (Mark Z Value at Each Vertex)
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 vertex Z-marking 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
ZMK labels every vertex of one or more selected 3D polylines with a text callout showing that vertex's Z (elevation) value. 3D polylines are preferred over 2D polylines in infrastructure projects because each vertex carries its own elevation, but reading those values normally means using the LIST command or walking the Properties panel vertex-by-vertex. ZMK automates that entirely.
How to Use
- Load
VXZMARK-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
ZMKat the command line and press Enter. - Select one or multiple 3D polylines whose vertex elevations you want marked.
- The routine automatically creates a dedicated layer,
BGOL-ZMK(colour light blue), and places a text label at every vertex of every selected polyline showing that vertex's Z value. - The command reports the total number of vertices labeled and how many polylines were processed.
Why Use It
- Instant visibility, converts invisible, vertex-locked elevation data into readable on-drawing labels without manual inspection of each vertex.
- Multi-selection support, label many 3D polylines' vertices in a single command run.
- Organized output, elevation labels land on a dedicated layer, so they can be frozen, isolated, coloured, or deleted independently of the source geometry.
- QA-friendly, spot elevation anomalies quickly, or produce annotated deliverables that show elevation without requiring the reader to inspect entity properties.
Where to Use It
- QA/review of 3D polylines representing breaklines, road/rail centerlines, drain inverts, or contour-derived lines, where per-vertex elevation accuracy matters.
- Producing annotated plan drawings that need visible spot elevations derived directly from 3D geometry rather than manually placed text.
- Any land-survey or infrastructure-engineering drafting step where 3D polyline elevation needs to be quickly audited or presented.
Notes
- Supports both legacy 3D POLYLINE entities (walking VERTEX sub-entities) and LWPOLYLINE entities carrying a single elevation value.
- Text precision defaults to 3 decimal places via the
*bgol-zmk-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
ZMK is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Supports both legacy 3D POLYLINE entities (walking VERTEX sub-entities) and LWPOLYLINE entities carrying a single elevation value.
Instant visibility, converts invisible, vertex-locked elevation data into readable on-drawing labels without manual inspection of each vertex.
Yes. ZMK 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 VXZMARK-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type ZMK 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.