LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

3DGraph View Angle Control

I've been working recently with the ActiveX 3DGraph Control (found in the 3DGraphCtrl.fp).  After a little help here recently, my data is ploting as expected.  One thing that I haven't been able to figure out though is how to programatically adjust the view angle of the graph.  I'd like to have buttons on my user interface to auto adjust the graph to orthoganal view angles (XY Plane, XZ Plane, and YZ Plane).  In the ActiveX Control editor for the 3DGraph, there is a parameter called "ViewMode".  This parameter has possible values of "cwViewXYPlane", "cwViewXZPlane", "cwViewYZPlane", "cwViewUserDefined".  What I CAN'T seem to figure out is how to set this parameter programatically.  I've been through the list of CW 3D Graph 6.0 functions  a couple of times, but still haven't found the solution.

 

Does anyone know if ther is a way to programattically control the view angle of a ActiveX 3DGraph control???   Maybe I've just missed the correct function?? Oh, I should also say that I HAVE looked through the various examples that are included with CVI (3DGraph.prj, 3DGraphAxis.prj, 3DGraphColorMap.prj, and 3DGraphContours.prj) any NONE of these seem to address this issue.

 

Thanks a bunch in advance!!

0 Kudos
Message 1 of 3
(3,318 Views)

Hi byrd01,

 

You can do this by setting CW3DGraphLib__DCWGraph3DSetViewMode, which is found under Instruments>> National Instruments CW 3D Graph 6.0 >> DCWGraph3D

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
0 Kudos
Message 2 of 3
(3,290 Views)

Thanks!  I eventually did find the CW3DGraphLib__DCWGraph3DSetViewMode function.  I also found the CW3DGraphLib__DCWGraph3DSetViewLatitude and CW3DGraphLib__DCWGraph3DSetViewLongitude functions to be helpful.  So, I'm currently using the following for preset view angles:

 

//Toggle XY Plane
CW3DGraphLib__DCWGraph3DSetViewMode (graphHandle, NULL, CW3DGraphLibConst_cwViewXYPlane);
               
//Toggle XZ Plane
CW3DGraphLib__DCWGraph3DSetViewMode (graphHandle, NULL, CW3DGraphLibConst_cwViewXZPlane);
               
//Toggle YZ Plane
CW3DGraphLib__DCWGraph3DSetViewMode (graphHandle, NULL, CW3DGraphLibConst_cwViewYZPlane);

 

//Toggle Isometric View
CW3DGraphLib__DCWGraph3DSetViewLatitude (graphHandle, NULL, 45);
CW3DGraphLib__DCWGraph3DSetViewLongitude (graphHandle, NULL, 45);

0 Kudos
Message 3 of 3
(3,266 Views)