Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Annotations on a CWGraph

I want to display a box over an area of a graph in Measurement Studio. I've added an annotation to my graph that shows up when the application displays the graph, but if I update the XCoordinate and YCoordinate properties to change the size and location of the rectangle, the rectangle goes away.
Does anyone have any experience using annotations on a CWGraph and how to programably set it's properties? It seems like it should be straight forward, but I must be missing something because it doesn't work. I've already discovered the bug dealing with the annotation visiblity property.
0 Kudos
Message 1 of 4
(4,824 Views)
Could you please post a small test project that reproduces the behavior that you're describing? Thanks.

- Elton
0 Kudos
Message 2 of 4
(4,824 Views)
Hello

Were you trying to set a single coordinate or did you pass in an array to the SetCoordinate function? I tried the following
Add a CWGraph on a form and add a rectangle annotation.
Have a button callback and add the following line

CWGraph1.Annotations(1).Shape.SetCoordinates Array(3, 6.7), Array(6.7, 3)

For more information, check out the help for the setCoordinate function.


I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 3 of 4
(4,824 Views)
I made up a test project and the annotation worked mint, so I went back to my application and could not find anything wrong with it. Finally I decided to delete the CWGraph on my form and then drew a new CWGraph back on the form, named it what the old one was and wha la, the annotations worked like they were suppose to. I still don't know what was wrong, but replacing the control did the trick.
0 Kudos
Message 4 of 4
(4,824 Views)