LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect autoscale?

Do you if there is any way to fix that "bug"?
CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 11 of 18
(1,141 Views)

Actually, now that I've run it on a graph with some data, I'm not sure that it is a bug, because it only resets the scale and the tool does immediately return to being the previous tool.

The only ways I can think of to go around this (at the moment) are to do things like periodically polling to check what the scale values actually are or calculating where you clicked with mouse.

Message Edited by tst on 07-13-2006 05:56 PM


___________________
Try to take over the world!
Message 12 of 18
(1,138 Views)
I think I'll follow the idea to save the scale Range at the first draw and then add a control to apply that values to the current values....

Thank you for help!!
CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 13 of 18
(1,127 Views)

Alright, so maybe this might win an award for "most dead thread brought back to life", but this is exactly the issue I'm having. I have a very large dataset that I'm decimating to show in an intensity graph. I've got it working where the user can use the normal zoom palette tools to zoom in and I access my larger data set (which is saved via a single queue element), using averaging around the decimation points that will eventually be displayed.

 

My problem is zooming back out. The single point zoom out works since it will change the x & y ranges to values beyond the physical extent of the actual dataset. Since I use the x & y range values to select the points for data decimation, this tool works. But the "zoom full" or "unzoom" tool I think just does an autoscale operation on both axes. Since I'm never really "zoomed in" (as in, the control isn't displaying a subset of the data), then autoscaling doesn't work to "unzoom". If I could detect if ActPaletteTool = 5, then I could manually set the full range of the data for decimation in the "mouse up" event that is handling my normal zoom-in operations

 

...hence I'm having the same issue detecting autoscale as the other users above. I could always put a little button next to the graph palette tools, and that's probably my plan B I'll start implementing, but it just seems inelegant when the unzoom tool is sitting right there.

0 Kudos
Message 14 of 18
(759 Views)

Hi mlang,

 

put your own autoscale button on top of the corresponding button of the tool palette. So the user doesn't recognize the difference Smiley Wink

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 18
(747 Views)

Hi!

 

As far as I remember, I implemented my self the autoscale detection using the method described by GerdW. I made a custom control which looks like the autoscale tool of the graph palette, and I was processing my data (zoom out and picture saving) when the user was clicking on my home-made control... 

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 16 of 18
(742 Views)

How do you make a custom control that pops up the six different zoom modes? Do you mean you just made a button that looked like the lower left of the six (the unzoom) and set it beside the palette tools?

0 Kudos
Message 17 of 18
(726 Views)

I wasn't showing all zoom options, just zoom out as I needed to...

To do what you what, youc ould do an Xcontrol... or launch a pop-up VI using VI Server (much easier faster to achieve)... Getting the mouse coordinates, you could set the pop-up window coordinates to match them...

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 18 of 18
(712 Views)