Viewport Descriptors

The function acedVports(), like the AutoLISP function (vports), gets a list of descriptors of the current viewports and their locations.

The following sample code gets the current viewport configuration and passes it back to AutoLISP for display.

struct resbuf *rb; 
int rc; 
rc = acedVports(&rb); 
acedRetList(rb); 
acutRelRb(rb);

For example, given a single-viewport configuration with TILEMODE turned on, the preceding code may return the list shown in the following figure.

Similarly, if four equal-sized viewports are located in the four corners of the screen and TILEMODE is turned on, the preceding code may return the configuration shown in the next figure.

The current viewport's descriptor is always first in the list. In the list shown in the preceding figure, viewport number 5 is the current viewport.