The PLIMMAX system variable stores the upper-right corner of the grid limits for paper space (current paper layout).
File: SysVarDefs.h
Module: API Reference