XLM LISP: Mark & Log Intersections by Layer (Free AutoLISP Download)
XLM finds every intersection between a selected base polyline (e.g., a road alignment) and a set of other selected lines or polylines. For each intersection it marks the point, computes the distance from the base polyline's starting point, records the layer of the crossing feature, and writes it all to a CSV file, turning a tedious manual crossing survey into a single command.
XLYRMRK-bgol (Mark & Log Intersections by Layer)
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 alignment/feature intersection reporting utilities used in civil/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
XLM finds every intersection between a selected base polyline (e.g., a road alignment) and a set of other selected lines or polylines. For each intersection it marks the point, computes the distance from the base polyline's starting point, records the layer of the crossing feature, and writes it all to a CSV file, turning a tedious manual crossing survey into a single command.
How to Use
- Load
XLYRMRK-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
XLMat the command line and press Enter. - Select the base polyline (the reference line whose crossings you want to analyze).
- Select all other lines/polylines that cross the base polyline.
- Every intersection point is marked with a small circle on layer
BGOL-XLM(colour red). - A CSV file (
BGOL-XLM-Intersections.csv, saved next to the current drawing) is written, listing the distance-from-start and layer name for every intersection found.
Why Use It
- Automates what would otherwise be manual, error-prone visual inspection and measurement of every crossing point on a complex map.
- Produces a clean, tabulated record (distance + layer) directly usable for planning reports, utility crossing schedules, or cross-discipline design coordination.
- Saves significant time on large town-planning or infrastructure maps with numerous intersecting feature layers.
Where to Use It
- Town planning and infrastructure coordination, identifying where a proposed road, pipeline, or channel crosses existing features and at what chainage/distance.
- Utility crossing analysis and reporting for design coordination between different engineering disciplines.
- Any drafting/analysis task needing a tabulated record of where a reference line crosses other layered features.
Notes
- The base polyline must have a well-defined start point; distances are measured along its length from that point using its curve parameter.
- Entities with no actual geometric intersection with the base polyline are simply skipped, no row is written for them.
- 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
XLM is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
The base polyline must have a well-defined start point; distances are measured along its length from that point using its curve parameter.
Automates what would otherwise be manual, error-prone visual inspection and measurement of every crossing point on a complex map.
Yes. XLM 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 XLYRMRK-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type XLM 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.