3-Point Rectangle

See also GrSnap.

Function Syntax 3PR / 3PRD (dynamic)
Current Version 1.0
Download 3P-RecV1-0.lsp
View HTML Version 3P-RecV1-0.html
Donate

Program Description

This program enables the user to dynamically construct a rectangle defined by three supplied points.

The program offers two commands: 3PR and 3PRD which represent a standard & dynamic version of the program respectively.

Upon issuing either command at the AutoCAD command-line, the user is first prompted to specify two points defining one of the two pairs of parallel sides of the resulting rectangle.

Following valid responses to these prompts, the user is then prompted for a third point to determine the length and direction of the second pair of edges, which are constructed perpendicular to the edges defined by the first two points. If the dynamic command is used (3PRD) the program will display a real-time preview of the resulting rectangle whilst the user is prompted for the third point.

The user may exit the program at any time by pressing ENTER or by right-clicking at any prompt.

Following valid specification of all three points, the program will proceed to construct the defined rectangle using a 2D polyline (LWPolyline) object.

The dynamic version of the program utilises my GrSnap utility to enable full Object Snap functionality during the dynamic prompt. Furthermore, this program has also been designed to perform successfully under all UCS & View settings.

Demonstration

3-Point Rectangle Demo

See also GrSnap.

Instructions for Running

Please refer to How to Run an AutoLISP Program.

textsize

increase · reset · decrease

Designed & Created by Lee Mac © 2010