Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Display data points from CWGraph

Sorry, I originally posted this in the .net forum instead of the VB6 forum. I will try to delete the .net post.  Please help...I need to be able to place the mouse pointer over any area of a plot line being displayed in a CWGraph control.  In an Excel chart you can simply place your mouse over a plot line and the values of the x and y axis will pop-up next to the mouse pointer.  This is exactly what I need to do in a CWGraph.  I found some examples that uses Annotations but that seems to simply return the x and y coordinates of the mouse pointer.  What I need it to do is to display the actual values within the plotted line.  Is this even possible?  I would appreciate any help you could give me....Thanks!
0 Kudos
Message 1 of 4
(7,418 Views)

Chris,

Yes this is possible, but I think there may be an easier way than using Annotations. The PlotMouseMove/Up/Down functions are designed to return the X, Y, Z values of the point nearest to the mouse pointer when the event occurred on the 3D graph.  You choose which event is used based on the function.  The event will either be a mouse movement, button click, or button release, based on the specified mouse button. You can then set a graph cursor to this location using the X, Y & Z coordinates.  Using this graph cursor you can display the coordinates of this point on the graph.  There are other ways to display the data depending on your preference.

If you want to use the above method you may want to refer to this thread which mentions some problems that may arise using the PlotMouse events in conjunction with a graph cursors, and how to work around them.  If you need a reference for working with cursors you can review the shipping example located at C:\Documents and Settings\All Users\Documents\National Instruments\MStudioVS6\VB\Samples\3DGraph\Cursors.  Also the Measurement Studio Help is a great function reference for all of the above.

John B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(7,400 Views)
I am using Measurement Studio Base v.6.0.  Is this possible with this version or do I need to upgrade to 8.1.2?
0 Kudos
Message 3 of 4
(7,394 Views)

Chris,

I am not quite as familiar with version 6.0 specifically, but this should be possible because the CWGraph3D class and its related classes are part of the standard MStudio package.  There have been very few changes to the Visual Studio 6.0 support libraries (.ocx files) other than bug fixes between your version and the current.  Therefore, these functions are not new and should be included with your software since the graphing functions come with the base package.

John B.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(7,371 Views)