Use System Variables in Calculations (CAL Command)

You can use the getvar function to read the value of a system variable.

The syntax is

getvar( variable_name )

The following example uses getvar to obtain the point that is the center of the view in the current viewport.

getvar(viewctr)

With this method, you can also access the user system variables, USERI1-5 and USERR1-5. For example, to retrieve the value stored in USERR2, enter the following:

getvar(userr2)