Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with cursors upgrading from Measurement Studio 6 to 8

I am upgrading an UI from visual basic 6 to visual express 2005 and the graph is also updated from measurement studio 6 to measurement studio 8. However, when I use the snap mode of the cursor I in a multiplot graph I have two problems:
1) I must provide a plot so the cursor snaps to. i.e.: the cursor only snaps to a single plot, instead of snapping to the closest point of any plot, as happened in M. Studio 6. I want the cursor to attach to the closest plot, independently of the plot I have selected for the cursor. How can I do this?
2) I can not get the index of the point where the cursor is snapped. I can only have the x and y value from the cursor properties, but I do not know which sample of the waveform I am pointing to. This data is very important and I do not know how to retrieve it.

I hope I made myself clear, apologize my English,

Regards, Ernesto

0 Kudos
Message 1 of 3
(3,441 Views)
1) This works for me in ScatterGraph

                cursor.SnapMode = CursorSnapMode.NearestPoint

2) use cursor.Plot to get the plot that it snapped to.  And then call cursor.GetCurrentIndex to get the index into the data array.


- Dave

Message 2 of 3
(3,393 Views)
Thank you Dave, it really works now!!
0 Kudos
Message 3 of 3
(3,384 Views)