04-13-2011 08:00 AM
Hello
I have problem with 3D graph, I want draw only simple curve, here is my code
04-18-2011 03:53 AM
Dear Honzik,
in order to do what you want to do, you need to replace:
CW3DGraphLib_CWPlots3DItem
with a function
CW3DGraphLib_CWPlots3DAdd
I can visualize it in LabVIEW:
Hope this helps.
If you have more problems, you can have a look at the following forum threads:
http://forums.ni.com/t5/LabWindows-CVI/Adding-plot-in-3D-graph/m-p/1230695
http://forums.ni.com/t5/LabWindows-CVI/problem-with-cw3dgraph/td-p/475090
Regards,
04-18-2011 05:52 AM
Jan Prudil
04-19-2011 08:20 AM
Dear Jan,
it should work in this configuration. Could you post your project files here?
As I wrote before, I used the same ActiveX functions in LabVIEW and it worked.
Regards,
04-19-2011 09:23 AM
here is my project, it is very simple only for testing 3D graph
thank you
04-20-2011 05:32 AM
Dear Jan,
please try:
GetObjHandleFromActiveXCtrl (panelHandle,PANEL_CWGRAPH3D , &graphHandle);
CW3DGraphLib__DCWGraph3DGetPlots (graphHandle, NULL, &plotsHandle);
CW3DGraphLib_CWPlots3DAdd (plotsHandle, NULL,&plotHandle);
double data1[4];
double data2[4];
double data3[4];
data1[0]=1;
data1[1]=8;
data1[2]=9;
data1[3]=6;
data2[0]=9;
data2[1]=2;
data2[2]=4;
data2[3]=5;
data3[0]=6;
data3[1]=2;
data3[2]=9;
data3[3]=8;
ERRORINFO i;
VARIANT xArray,yArray,zArray;
CA_VariantSet1DArray (&xArray, CAVT_DOUBLE, 4, &data1);
CA_VariantSet1DArray (&yArray, CAVT_DOUBLE, 4, &data2);
CA_VariantSet1DArray (&zArray, CAVT_DOUBLE, 4, &data3);
CW3DGraphLib_CWPlot3D_CIPlot3DCurve (plotHandle, NULL, xArray, yArray, zArray, CA_DEFAULT_VAL);
CA_VariantClear (&xArray);
CA_VariantClear (&yArray);
CA_VariantClear (&zArray);
Regards,
04-20-2011 12:10 PM
Thank you, it works.