Share

acgsGetViewportInfo

C++

Adesk::Boolean acgsGetViewportInfo(
    int viewportNumber, 
    int & left, 
    int & bottom, 
    int & right, 
    int & top
);

File

acgs.h

Description

This function retrieves the dimensions of the viewport identified by viewportNumber. (This number is the same as the numbers reported by the CVPORT AutoCAD system variable. For example, the Paper Space viewport is number 1.) Left, bottom, right, and top are filled in with the boundaries of the viewport in screen pixels, relative to the bottom left of the drawing area. If the viewport number supplied is not valid, then the routine will return Adesk::kFalse and the parameters will not be altered.

Returns Adesk::kTrue if successful. If viewportNumber is invalid or some other failure occurs, left, bottom, right, and top will remain unchanged and the function will return Adesk::kFalse.

Parameters

Parameters Description
viewportNumber Input number of the viewport to work with
left Returns the left pixel column of the viewport
bottom Returns the bottom pixel row of the viewport
right Returns the right pixel column of the viewport
top Returns the top pixel row of the viewport

Was this information helpful?