# GetAxisRange

int GetAxisRange (int panelHandle, int controlID, int *xAxisScaling, double *xmin, double *xmax, int *yAxisScaling, double *ymin, double *ymax);

## Purpose

Obtains the scaling mode and the range of the x- and y-axes for a graph or strip chart control.

GetAxisRange does not support the right y-axis and is therefore obsolete. NI recommends that you use GetAxisScalingMode instead. To obtain the x-offset and x-increment for a strip chart, use the ATTR_XAXIS_GAIN and ATTR_XAXIS_OFFSET attributes.

## Parameters

Input
Name | Type | Description
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
Output
Name | Type | Description
xAxisScaling | integer | Current scaling mode of the x-axis.
0L = VAL_MANUAL | The x-axis is manually scaled, and xmin and xmax define its range.
1L = VAL_AUTOSCALE (graphs only) | The x-axis is autoscaled. xmin and xmax are not returned. Autoscaling is not allowed for strip charts.
xmin | double-precision | Current minimum range of the x-axis.
xmax | double-precision | Current maximum range of the x-axis.
yAxisScaling | integer | Current scaling mode of the y-axis.
0L = VAL_MANUAL | The y-axis is manually scaled, and ymin and ymax define its range.
1L = VAL_AUTOSCALE (graphs only) | The y-axis is autoscaled. ymin and ymax are not returned. Autoscaling is not allowed for strip charts.
ymin | double-precision | Current minimum range of the y-axis.
ymax | double-precision | Current maximum range of the y-axis.

## Return Value

Name | Type | Description
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.
Code | Error Message String
xx | Success