Offset Polyline Section

Function Syntax offsec
Current Version 1.1
Download OffsetSectionV1-1.lsp
View HTML Version OffsetSectionV1-1.html

Program Description

This program enables the user to offset a section of a polyline enclosed by two selected points on the polyline.

Upon issuing the command syntax offsec at the AutoCAD command-line, the user is first prompted to specify an offset distance by which the polyline section will be offset to both sides. At this prompt, the last entered offset distance is available as a default option, with an initial default of 1 unit.

The user is then prompted to select a polyline to offset; the program is compatible with lightweight polylines (LWPolylines) of constant or varying width, with straight and/or arc segments, and defined in any UCS construction plane.

Following a valid selection, the user is then prompted to specify two points along the length of the selected polyline enclosing the polyline section to be offset by the program. If either of the selected points does not lie directly on the selected polyline, the program will automatically use a point on the polyline situated closest to the point selected by the user.

If two valid distinct points are specified, the program will proceed to offset all complete & partial polyline segments enclosed between the two points (in the direction of the polyline) to both sides by the offset distance specified.

As noted above and also demonstrated in the animation below, the program will perform successfully with all forms of LWPolyline with constant or varying width segments, straight or arc segments, and defined in any UCS construction plane.

Program Demonstration

Offset Section Demo

Instructions for Running

Please refer to How to Run an AutoLISP Program.


increase · reset · decrease

Designed & Created by Lee Mac © 2010