Share

acedVports

C++

int acedVports(
    struct resbuf ** vlist
);

File

acedads.h

Description

Returns a pointer to a list of viewport descriptors for the current viewport configuration.

Warning To avoid a memory leak, before calling acedVports(), set result to null to ensure that it does not point to allocated memory.

If the AutoCAD TILEMODE system variable is set to 1 (on), the returned list describes the viewport configuration created with the AutoCAD VIEWPORTS command. The corners of the viewports are expressed in values between 0.0 and 1.0, with (0.0, 0.0) representing the lower-left corner of the display screen's graphics area, and (1.0, 1.0) representing the upper-right corner.

Each viewport descriptor is a sublist consisting of the viewport identification number and the coordinates of the viewport's lower-left and upper-right corners.

If TILEMODE is 0 (off), the returned list describes the viewport entities created with the MVIEW command. The viewport entity corners are expressed in paper space coordinates. Viewport number 1 is always paper space when TILEMODE is off.

The current viewport's descriptor is always first in the list.

If it succeeds, acedVports() returns RTNORM; it returns RTERROR if it can't allocate the list.

Call acutRelRb() to deallocate memory for the contents of result.

Parameters

Parameters Description
vlist Pointer to the returned viewport descriptor list

Was this information helpful?