eplisp

Double-Sided Polyline Offset

eplisp, the free multilingual LISP library

Double-Sided Polyline Offset
Openly licensed; the original file is hosted here together with its license.
…
Rate this tool:
CommandsDBOF
CategoryPolyline Tools
AuthorBGol Community
Sourcethevijayparmar/bgol-cad-lisps
LicenseMIT
RequirementsAutoCAD (full version, not LT), BricsCAD; no Express Tools needed.
Prompt languageEnglish
FilesDBLOFST-bgol.lsp (4 KB)
Added2026-10-26
Download the original fileSource repository

DBOF offsets selected polylines to both sides in one pass, with separate right and left distances, so road edges come straight from centerlines.

DBOF is a small AutoLISP routine shared by the BGol Community. It offsets every selected LWPOLYLINE to the right and to the left at the same time, with a separate distance for each side. It is meant for road, subdivision or channel layouts where edge lines are generated from centerlines, and it saves running OFFSET twice per line.

Overview

For each polyline the routine calls the ActiveX Offset method once with a positive value (right distance) and once with a negative value (left distance), so right and left follow the direction in which the polyline was drawn. The new polylines are moved to layer BGOL-DBOF (created in yellow if missing), and the command line reports how many centerlines were processed.

How to use it

  1. Load DBLOFST-bgol.lsp with APPLOAD.
  2. Type DBOF at the command line.
  3. Select the centerline polylines and press Enter.
  4. Enter the right-side offset distance.
  5. Enter the left-side offset distance; two new polylines are created for each centerline.

Notes and limitations

  • Only LWPOLYLINE objects can be selected; LINE, ARC and old-style 2D/3D polylines are filtered out.
  • Right and left depend on the polyline's direction; if the result is mirrored, flip the polyline with REVERSE.
  • The new lines are always placed on layer BGOL-DBOF, which is created if needed, not on the source layer.
  • The source polylines are not modified.
  • License: the repository's LICENSE file is MIT; the file header also states the code is free to use, modify and share.
  • The repository was published in 2026 and the amount of testing is not stated; try it on a copy of the drawing first.

Source and license

This tool is not made by eplisp. The file is published unchanged under its author's license; copyright stays with the author.

References

  1. Source repository: thevijayparmar/bgol-cad-lisps – https://github.com/thevijayparmar/bgol-cad-lisps/tree/3acbe32f71b489f4c81dcd9372f989591a9be858/Polyline%20Lisps/Offset%20Polyline%20on%20either%20Side
  2. Author: BGol Community – https://bgol.in/
  3. License: MIT – https://github.com/thevijayparmar/bgol-cad-lisps/blob/3acbe32f71b489f4c81dcd9372f989591a9be858/LICENSE

Found a mistake, or are you the author of this tool? Request a correction or removal