GRDL LISP: Scale-Aware Gradient Formation Line (Free AutoLISP Download)
GRDL draws a formation/design line on a profile drawing directly from a gradient value (expressed as "1 in N"), correctly converting real-world chainage and rise into drawing-space coordinates using the profile's horizontal and vertical scale factors, which are almost always different on a longitudinal section. You can chain multiple gradient segments in one run, each starting where the previous one ended.
GRADLINE-bgol (Scale-Aware Gradient Formation Line)
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 scale-aware gradient line drafting used in longitudinal-section (profile) drawings. 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
GRDL draws a formation/design line on a profile drawing directly from a gradient value (expressed as "1 in N"), correctly converting real-world chainage and rise into drawing-space coordinates using the profile's horizontal and vertical scale factors, which are almost always different on a longitudinal section. You can chain multiple gradient segments in one run, each starting where the previous one ended.
How to Use
- Load
GRADLINE-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
GRDLat the command line and press Enter. - Pick the start point on the profile (typically on the existing ground line).
- Enter the profile's Horizontal Scale and Vertical Scale factors, or press Enter to reuse the values from the last run.
- For each segment, enter the chainage length and the gradient as "1 in N" (enter just N; use a negative value for a falling grade).
- Press Enter with no chainage length to finish. Each segment is drawn as a LINE on layer
BGOL-GRDL, and the new endpoint automatically becomes the next segment's start point.
Why Use It
- No manual recalculation, converts real-world gradient and chainage into correct drawing coordinates automatically, even with mismatched horizontal/vertical scales.
- Faster profile design, speeds up road, rail, drain, and pipeline profile design, where the design line is a series of straight gradient-defined segments.
- Fewer drafting errors, removes the trial-and-error point-picking otherwise needed to "eyeball" a gradient on a distorted-scale drawing.
Where to Use It
- Creating the proposed/formation level line on a road, railway, or irrigation channel longitudinal section.
- Any profile/LS drawing task where a line must be drawn at a defined real-world gradient rather than a visual angle.
- Iterative design of vertical alignments built up from a series of connected grade-controlled segments.
Notes
- Horizontal and vertical scale factors are remembered between runs within the same drawing session, so repeat use only requires pressing Enter to keep the previous values.
- Gradient sign convention: positive N is a rising grade, negative N is a falling grade, matching the "1 in N" convention common in civil profile design.
- 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
GRDL is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Horizontal and vertical scale factors are remembered between runs within the same drawing session, so repeat use only requires pressing Enter to keep the previous values.
No manual recalculation, converts real-world gradient and chainage into correct drawing coordinates automatically, even with mismatched horizontal/vertical scales.
Yes. GRDL 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 GRADLINE-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type GRDL 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.