Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

I dont want my cursors' x-coordinate to change when I update the plot

Currently when I update the data in my Graph my cursor moves around the graph
with the new data, possibly to the point with the closest circular distance.
What I want is the cursor to only change position vertically, that is move to
the point with the closest horizontal distance.
0 Kudos
Message 1 of 4
(3,367 Views)
I'm not sure if I fully understood your question but I think this would help. On the WaveformGraph, right click to Edit Cursors>>Add...Change the Snap Mode property>>To Plot. You can chnage this property to Floating if you want it go move to any point on the graph. Another resource that might be useful to you would be the Simple Graph example program located in the following folder.
C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Examples\Application\SimpleGraph

If you have an further questions, please feel free to ask.

Thank you

Nandini Subramaniam
NI
0 Kudos
Message 2 of 4
(3,340 Views)
Nandini's suggestion works well if you don't want the cursor to move at all when you plot new data. If you want the cursor to change its y position but maintain its x position, keep the cursor's SnapMode as ToPlot and set the cursor's XPosition property to the value that you want it to stay at after you plot.

- Elton
0 Kudos
Message 3 of 4
(3,333 Views)
Elton
Your approach works until you try using cursor.MoveNext and MovePrevious with key navigation.
The solution that I found which works best is to use GetCurrentIndex and MoveCursor.
Thanks for your responses.
0 Kudos
Message 4 of 4
(3,324 Views)