Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

GetSignalPlotAt always returns null for DigitalWaveformGraph

I am trying to use the GetSignalPlotAt method (DigitalWaveformGraph class) to return a signal plot so I can extract data in the vicinity of the mouse. The problem is that this method always returns null. Any ideas? The goal is to find the data transition closest to the mouse. 

0 Kudos
Message 1 of 6
(4,481 Views)

@standingTree wrote:

I am trying to use the GetSignalPlotAt method (DigitalWaveformGraph class) to return a signal plot so I can extract data in the vicinity of the mouse. The problem is that this method always returns null. Any ideas? The goal is to find the data transition closest to the mouse. 


 

What are you passing to the GetSignalPlotAt function?

 

According to http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/baaa8a74/

You can pass the X and Y coordinates from the MouseEventArgs event argument of the PlotAreaMouseDown, PlotAreaMouseMove, PlotAreaMouseUp, or PlotAreaMouseWheel events as the x and y parameters.

 

0 Kudos
Message 2 of 6
(4,468 Views)

I am passing x and y integers (in client coordinates) to GetSignalPlotAt method.

0 Kudos
Message 3 of 6
(4,465 Views)

@standingTree wrote:

I am passing x and y integers (in client coordinates) to GetSignalPlotAt method.


I don't know what you mean by client coordinates.

You need to use the methods described to get your X and Y.

 

 

0 Kudos
Message 4 of 6
(4,462 Views)

By client coodinates, I mean coordinates that are relative to the plot area upper left corner as opposed to screen coordinates that are relative to the upper left corner of the screen. I am using the recommended events, because they supply the mouse coordinates relative to the client. 

0 Kudos
Message 5 of 6
(4,460 Views)

I had to write my own GetSignaPlotAt method in order to access the plot at the client coordinates. The NI supplied method always returns null.

0 Kudos
Message 6 of 6
(4,422 Views)