04-21-2015 03:57 PM
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.
04-22-2015 02:26 PM
@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.
04-22-2015 02:49 PM
I am passing x and y integers (in client coordinates) to GetSignalPlotAt method.
04-22-2015 03:09 PM
@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.
04-22-2015 03:13 PM
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.
04-27-2015 10:24 AM
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.