[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Offset Line to Midpoint
Tip# 4137 By Jan R. James Bath On 19-Jun-2013
Rated By 0 users Downloaded : 1161
Categories : Linear Objects
Software type : AutoCAD 2014
Rename File To : ol.lsp
Draw a line midway between two existing lines.

Jan Bath offers up a nice little AutoCAD routine to offset a line — and this one has a twist. Once you pick two lines, this routine will draw the new line midway between the existing two. It's best if the original lines are parallel (or close to it).

Start by loading the LISP routine, then type in the command OL. Choose the line to offset, then pick the second line and the routine will calculate the midpoint. Jan uses this routine to draw a road centerline when the starting objects are both right-of-way lines.


Average Rating:

User comments
Comment by Cooper,Kent
Posted on 2013-06-19 09:48:57
See also http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Line-between-two-lines/m-p/3796321#M309553, with its LineBetween.lsp routine, which will draw a Line halfway between any two Lines or Polyline line segments, whether parallel or not, and other routines earlier on the same thread that work only with Line entities, some accounting for Z-direction differences and some not. And see CAD Tip #3756, "Bisect Angle/Spacing between Straight Entities," which draws an Xline halfway between any parallel straight things, or bisecting the angle between them if they're not parallel, allowing selection of MANY entity types.