08-27-2009 09:36 AM
I implemented the following code in my program (taken from the 3D graph example). I initially draw my graph as a surface and this code works to change the style to a point graph, but it does not allow me to change it back to the surface plot (these are my only 2 options in my ring control). The example program does exactly what I want, but it isn't working here. I don't think there is anything changed from the program, so I don't understand what would be causing the issue, and I've verified in the degbugger that the correct calls are being made in the case statement. Is there a dependancy that I'm not aware of for changing a point graph to a surface graph?
Any ideas?
Thanks
Ryan
int CVICALLBACK GRAPH_RING (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
int style;
switch (event)
{
case EVENT_COMMIT:
//Set Plot Style to selected mode
GetCtrlVal (sat_panel_handle, SAT_FORM_GRAPH_RING, &style);
switch (style)
{
case 0:
CW3DGraphLib_CWPlot3DSetStyle (threeDplotHandle, NULL, CW3DGraphLibConst_cwLine);
break;
case 1:
CW3DGraphLib_CWPlot3DSetStyle (threeDplotHandle, NULL, CW3DGraphLibConst_cwPoint);
break;
case 2:
CW3DGraphLib_CWPlot3DSetStyle (threeDplotHandle, NULL, CW3DGraphLibConst_cwLinePoint);
break;
case 3:
CW3DGraphLib_CWPlot3DSetStyle (threeDplotHandle, NULL, CW3DGraphLibConst_cwHiddenLine);
break;
case 4:
CW3DGraphLib_CWPlot3DSetStyle (threeDplotHandle, NULL, CW3DGraphLibConst_cwSurface);
break;
case 5:;
CW3DGraphLib_CWPlot3DSetStyle (threeDplotHandle, NULL, CW3DGraphLibConst_cwSurfaceLine);
break;
case 6:
CW3DGraphLib_CWPlot3DSetStyle (threeDplotHandle, NULL, CW3DGraphLibConst_cwSurfaceNormal);
break;
case 7:
CW3DGraphLib_CWPlot3DSetStyle (threeDplotHandle, NULL, CW3DGraphLibConst_cwContourLine);
break;
case 8:
CW3DGraphLib_CWPlot3DSetStyle (threeDplotHandle, NULL, CW3DGraphLibConst_cwSurfaceContour);
break;
}
break;
}
return 0;
}