From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wherefore art thou Control of Picture? 2D or not 2D?

The little VI utility made the jump from LabVIEW 711 to 2012 today. It was useful in the following way. The 'picture' was a large .png, let's say 3000 x 1500 pixels. The picture control was about the size of 500 x 500 but it had scroll bars, so it acted like a magnifying glass for the picture. The picture control returned the mouse coordinate values in terms of the large picture, so for example if I slid the scroll bar and moused onto a different part of the picture I would get the mouse coordinates of the picture (and not of the picture control widget.)

 

The 2D picture control will show the big picture, with the scroll bars, but the mouse coordinates are always the position of the mouse in the widget, not the postition of the mouse in the picture. So this bug has broken my program because it is using 2D picture instead of picture control.

 

Another observation is that a direct conversion from 711 to 2012 yields a block diagram picture VI from the library with a big-fat-red-X on the icon. Does big-fat-red-X on library icon mean anything? Do I have to baby along  these red-X VIs to get my new stuff to work? It seems that some direct conversions with red-X VIs still sort of work.

 

 

0 Kudos
Message 1 of 6
(2,999 Views)

From other code upgrades i've done i'd say big red X's is discontinued functions. Upgrading that many versions at once can unfortunatly have such side effects. I assume you need to redo your position calculation to viewport pos/picture size.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 6
(2,972 Views)

I see that the VI with the red X is really quite trivial. So with the 2D picture control instead of the picture control the only connection between the picture pixel space and the widget (viewport) is the origin property. The mouse position used to be a connection between the two spaces, but here (in 2013 time) I am grousing about some change in LabVIEW 2009. Even still, I have tried to research this problem through search on the National Instruments web site and I cannot find relevant information. Simply because the mouse position property is still there but it doesn't return the same data makes me view it as a silent bug; ya know why? Because I spent an hour fooling around with my constructor gizmo before I realized that the mouse was not returning expected data. The 7.1.1 programs that had previously been constructed still work because they use only the origin property and a database. The constructor gizmo used the mouse position.

0 Kudos
Message 3 of 6
(2,942 Views)

Maybe it's just me (though probably not), but I'm having a really hard time following. How about instead of the clever banter and the assumption that we understand you, you simply describe exactly what you're seeing and what you're actually expecting to see, ideally with some code attached so that people don't have to guess.

 

I have several potential theories off the top of my head, but can't apply either one without actual understanding:

 

  1. There was some change made to the picture control VIs. The only reason I know that is that when I back saved a VI which called them to an earlier version, LV said something specifically about that. I think it was between LV 7.1 and 8.0. I have no idea what the actual changes are. I certainly haven't seen a change in the API between 7.0 and 8.x and I know it fairly well.
  2. LV 8.0 introduced panes which changed the way LV treats the position of controls on the front panel. I would expect that a program imported from an earlier version would work correctly (at least that has been my experience), but maybe you're doing something which broke it. Or your utility VIs needs to be adapted to work with this. I would say that's the most likely scenario.
  3. You're using .NET (the "constructor" comment ) and something changed in the way LV talks to it.

 

As for the "2D picture", I haven't checked but I'm assuming that this is simply the picture control you're used to (makes sense, since you say you didn't change the code). If that's the case, the reason for the different name would be that after 7.1 LV had a 3D picture control added and NI probably renamed the picture control to 2D picture control to make the difference clear.


___________________
Try to take over the world!
0 Kudos
Message 4 of 6
(2,924 Views)

Thank You for your helpfull input 'tst' , here and in other posts in this trying time for me. While the anxiety factor has reduced considerably, as time moves forward, the build is spectacle to be seen with the GDI objects used as shown in Task Manager. Dollars to donuts I will not get the Jefferson bonus; I will not lament.

 

0 Kudos
Message 5 of 6
(2,866 Views)

@Odd_Modem wrote:

Thank You for your helpfull input 'tst' , here and in other posts in this trying time for me. While the anxiety factor has reduced considerably, as time moves forward, the build is spectacle to be seen with the GDI objects used as shown in Task Manager. Dollars to donuts I will not get the Jefferson bonus; I will not lament.

 


Huh? Do you LARP?

Message 6 of 6
(2,848 Views)