LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CWGraph Annotation BUG !

I'm using CVI 6.0 and Win2K

In a CWGraph, if you try to set an annotation visible or not it does not work.

Here is my code:

GetObjHandleFromActiveXCtrl(ihGraph, GRAPH_CWGRAPH, &hPlotGraph);

CWUIControlsLib__DCWGraphGetAnnotations (hPlotGraph, NULL, &hAnnotations);

CWUIControlsLib_CWAnnotationsItem (hAnnotations, NULL, CA_VariantInt(2), &CurrentAnnotation);

CWUIControlsLib_CWAnnotationSetVisible (CurrentAnnotation, NULL, VTRUE);

The error that I get is an invalid variable type, why ??????
0 Kudos
Message 1 of 3
(2,896 Views)
You're right, this is an bug in the implementation. The Visible property is typed as a VBOOL in the type library, but it apparently isn't implemented that way. I will report the problem to our developers to fix.

In the short term, the easiest way to work around the problem would probably be to move the annotation out of the visible area on the graph. You could also delete the annotation, but that would be more work.

Best Regards,

Chris Matthews
National Instruments
Message 2 of 3
(2,896 Views)
Any idea when this is going to be fixed 'cos I have just bumped into the same problem.

Paul Rocca
0 Kudos
Message 3 of 3
(2,896 Views)