06-19-2013 10:04 AM
Hello Developers!
Does anybody know if it is possible to determine programatically if a Waveform Graph Scale has been changed with the zoom tool or manually modifying the numbers in the scale legend? I thought the Scale range change event notifies the difference, but i cannot get it.
Thanks in advanced.
Regards.
06-19-2013 10:15 AM - edited 06-19-2013 10:16 AM
@ibvp_ss wrote:
Hello Developers!
Does anybody know if it is possible to determine programatically if a Waveform Graph Scale has been changed with the zoom tool or manually modifying the numbers in the scale legend? I thought the Scale range change event notifies the difference, but i cannot get it.
Thanks in advanced.
Regards.
you could store the scale value on a shift register and compare the before and now values to not equal to bool out a change
06-19-2013 10:28 AM
Hi,
why do you need to know how the scale was changed?
Only idea how to do until now: Monitor the range - if only one element changed it was *most likely* done by entering a new min or max.
Regards
Florian
06-20-2013 03:54 AM
Thanks both for the answers. I will check if it works later.
I need this differentiation because I am creating an Osciloscope. If the change is made manually we need to create the new scale and the new grids starting in this new point mantaining the time/division value, but if we zoom in, the programm should recalculate even the val per division.
Regards.
06-20-2013 06:35 AM
@ibvp_ss wrote:
[...] the Scale range change event notifies the difference, but i cannot get it
This works for me. What isn't working for you?
06-20-2013 08:15 AM
Hello Jim,
Yes, that works. The thing is that I cannot get the info about how was the scale modified. I need to know if the user has changed the scale manually writing down a number in the scale legend or if it has been done with the zoom tool...
06-20-2013 09:32 AM
I don't know how Rube-ish this is, but it works. What it does is takes advantage of the fact that the zoom tool will (probably) change both axes, while typing will only change one.