Viewport Outline

Function Syntax vpo
Current Version 1.2
Download VPOutlineV1-2.lsp
View HTML Version VPOutlineV1-2.html
Donate

Program Description

This program allows the user to automatically generate a polyline in modelspace representing the outline of a selected paperspace viewport.

The command is only available in paperspace (that is, when a layout tab other than the Model tab is the current layout, and no viewports are active). Upon issuing the command syntax VPO at the AutoCAD command-line, the user is prompted to select a viewport for which to construct the viewport outline in modelspace.

Following a valid selection, the boundary of the selected viewport is transformed appropriately to account for the position, scale, rotation, & orientation of the modelspace view displayed through the selected viewport, and a 2D polyline (LWPolyline) representing this transformed boundary is constructed in modelspace.

The program is compatible for use with all Rectangular, Polygonal & Clipped Viewports (including those with Arc segments), and with all views & construction planes.

The program also offers the ability to optionally offset the polyline outline to the interior of the viewport boundary by a predetermined number of paperspace units specified in the 'Program Parameters' section of the program source code.

The program may also be configured to automatically apply a predefined set of properties (e.g. layer, colour, linetype, etc.) to the resulting polyline outline - these properties are also listed within the 'Program Parameters' section of the source code.

Demonstration

In the following demonstration, the program has been configured to offset the outline by 2 units, and place the result on a separate layer.

Viewport Outline Demo

Instructions for Running

Please refer to How to Run an AutoLISP Program.

textsize

increase · reset · decrease

Designed & Created by Lee Mac © 2010