Showing results for 
Search instead for 
Did you mean: 

A problem for the picture control .


There is such a question :
When loading a picture into a picture indicator , I can pop up a dialog and have the user to assign some property values for the picture , the application then saves the values to a file . I believe I can recover graphics information through reading the file , but how to create such a mechanism which can assign or associate a data type (e.g. a Boolean value) as the user specified to a picture ? Of course , in edit status , a control can be customized and replaced by a picture sign , but I need to realize this when the application is running . Thanks .

0 Kudos
Message 1 of 12
You can use a picture control, and then use an event structure to handle any type of interaction. You can then make it behave like a boolean. You then can right click on that picture control, create a property node to get/set the current picture in the picture control (programatically).
0 Kudos
Message 2 of 12
If you have a picture control with several different shapes drawn in series by the various shape VI's offered in LabVIEW, can each of these shapes be addressed by user events, or just the one picture control into which the shapes are dumped? 

I have started drawing an floor plan of the system I am using LabVIEW to control.  Presently, the colors of the various shapes are indicative of certain states of the instrument.  I want to make these "custom indicators" into custom controls as well using event programming, however every shape in the one picture control will control a different component.  Is this possible, or should I abort and take a new approach?
0 Kudos
Message 3 of 12
It might be very helpful if you could attach the VI that you are speaking of.  That would help to clarify how you are using different shapes in a picture control and exactly how you would like to interface with each one.
Peter L.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 12
Here is a VI-in-progress drawig some components of our system.  I will post shape subVI's in subsequent replies. 

This VI simply generates random numbers and colors shapes accordingly.  Therefore, separate shapes in the same picture indicator are individual indicators.  What I am aiming to do is use event structures to make individual shapes in the single picture indicator controls as well as indicators (i.e. On mouse over circle, open "", on mouse click on diamond, send 5 volts to channel AO 21, PXI 6528). 

I have read some threads indicating the need for tedious locating of different regions in the picture indicator for event programming, but I have not gotten that far yet.  I am still designing a picture indicator with individual indicators. 


The main VI is the "Multiple Shapes"
It calls "Draw LE" and "(XY)r to 4s"  among others.  I will post the others subsequently.
0 Kudos
Message 5 of 12
Two other called subVI's from "Multiple Shape"

"Draw SNICS"
"Degrees to"
Download All
0 Kudos
Message 6 of 12
Here is another VI with event programming that doesn't seem to do anything.  This is my first attempt at attaching a control feature to the picture out.  Not many options for "picture" events....Maybe I'm barking up the wrong tree here.

This runs with the sub's above.
0 Kudos
Message 7 of 12

Sorry i do not have time to help out here but re: "....Maybe I'm barking up the wrong tree here." I can tell you that I have done what you are attempting a number of times and it can work!

Gotta run!


Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 12



I took a quick peek and I am not sure what you are trying to do.

Could you add some notes to your example and save the default control values, please?

A "mouse Down' event will let you know when the user clicks somewhere in the pict control.

The "Mouse enter" and leave will let you know when the mouse enters or leaves the pic control.

I believe "mouse move" may also be handy.

The coordinates for the mouse postition are in (?) screen coordinates so you have to adjust for the location of the picture control.

Have you looked at all of the examples that are indexed in the "Picture Control" thread (see URL below)?

Gotta run!


Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 12
Thanks Ben. 

Yes, in fact I have been looking at that particular thread.  So far I haven't found what I am trying to do, though.  All of the examples on that thread are manipulating a single picture ,in its entirety, as a control.  I am trying to manipulate different parts of a single picture as individual controls.  I have put some notes into the example I posted earlier with the event structure.  The goal would be once I get the first event working, to create a second event for an individual shape.  Currently, the event structure pertains to the picture indicator in its entirety, but I have bundled some of the diamond parameters to attempt to sync them with the "coords" control in the event structure.  (Can I make this an indicator, rather than a control???)

It seems an easier way to do this would be to draw the individual shapes right onto the front panel - without the picture indicator amalgamating everything.  Is this possible?
0 Kudos
Message 10 of 12