Hello Randy,
In order to programatically change the min and max values of the axes of a CWGraph before you have plotted to it, you must:
1. Get a handle to the axes of the graph.
CWUIControlsLib__DCWGraphGetAxes (objectHandle, NULL, &axesHandle);
2. Get a handle to the Y axes.
CWUIControlsLib_CWAxesItem (axesHandle, NULL, CA_VariantInt(1),&axisYHandle);
3. Get a handle to the X axes.
CWUIControlsLib_CWAxesItem (axesHandle, NULL, CA_VariantInt(2),&axisXHandle);
4. Set the minimum/maximum of the X and Y axes.
CWUIControlsLib_CWAxisSetMinMax (axisXHandle, NULL, CA_VariantInt(xMin), CA_VariantInt(xMax));
CWUIControlsLib_CWAxisSetMinMax (axisYHandle, NULL, CA_VariantInt(yMin), CA_VariantInt(yMax));
Where the constants are declared as:
int xMin, yMin, xMax, yMax;
CAObjHandle objectHandle;
CWUIControlsLibObj_CWAxis axisYHandle, axisXHandle;
CWUIControlsLibObj_CWAxes axesHandle;
Hope that helps.
Wendy L
LabWindows/CVI Developer Newsletter