03-25-2015 10:58 AM
Hello everybody,
I have a second question, so i made a 3D graph and, according to the acquisition that i'll choose ( 2 mode ), the X and Y axes will change. So i want to program this change. I managed to change the X axis but i don't know how to select Y and change it.
Fonction use :
CWAxis3DSetCaption(AxisHandle, NULL, p_rev);
Solved! Go to Solution.
03-27-2015 07:44 AM
Start from the following example: 3DGraphAxis.cws (you’ll find it in the CVI library of examples). This example makes use of CWAxis3DSetCaption as well as several other CWAxis3DSet* functions.
Typically, these functions take an object reference, gAxis (your “AxisHandle”), to refer to the axis that will have its properties set. Example: CWAxis3DSetCaption(gAxis, NULL, caption).
To get the gAxis reference, you need to call:
CWAxes3DItem(axes, NULL, CA_VariantInt(axis + 1), &gAxis))
“axes” is of type CAObjHandle and is a handle to the ActiveX object associated to the axis;
“axis” is an integer (axis = 0 for the X axis, 1 for the Y axis and 2 for the Z axis);
(CA_VariantInt is just a function that converts integers to the variant type);
Now, how do you get “axes”? This way:
Declare it: CAObjHandle axes = 0;
Then get it thanks to this function call: DCWGraph3DGetAxes(gGraph, NULL, &axes))
And if you also need to get a handle to the graph (but I suppose you already have one defined somewhere in your code), simply do:
CAObjHandle gGraph;
GetObjHandleFromActiveXCtrl(gPanel, PANEL_CWGRAPH3D, &gGraph);
Have a look to the AxisCallback CVI callback in the source code of the example, you’ll see the piece of code that manage all these handles.
I hope this will help...
Pierre-Emmanuel BELLES
Certified LabVIEW Developper
Certified TestStand Architect
03-27-2015 12:04 PM
Thanks for your answer, after some time on the exemple I find how to do it. Your explanation was very clear.
03-29-2015 10:32 AM
You're welcome 🙂
I wish you a successful code development!
Pierre-Emmanuel BELLES
Certified LabVIEW Developper
Certified TestStand Architect