LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to place icons in the vi screen on-the-fly

I have been trying to place various icons on a vi screen on-the-fly, which depends on occurances in the analysis process.  I can't figure out how to do this however,  I found a sample vi in the NI resources that "hopefully" shows how this is done.

 

Problem..... the sample VI is in 8.6 and I am running 8.5 so I can't read it.  Is there anyone that would be willing to convert the 8.6 file to an 8.5  for me (file attached).

 

Or, does anyone have any suggestions as to how to move icons in and out of a vi screen?

0 Kudos
Message 1 of 11
(4,481 Views)

This is a question that comes up from time to time. Creating controls "on the fly"

 

(image courtest of Christian Altenbach)

 

can be quite challenging or trivial depending on how much you can nail down at design time.

 

This thread may be of interest. Post #94 of this thread has a zip showing hw to put image in a picture control.

 

Ben 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 11
(4,478 Views)

I tried to convert it but get a fatal error. I hope they fix that soon!!! here is a snap shot of the code.

 

Code.png

Tim
GHSP
0 Kudos
Message 3 of 11
(4,477 Views)

irfocus wrote:

I have been trying to place various icons on a vi screen on-the-fly, which depends on occurances in the analysis process.  I can't figure out how to do this however,  I found a sample vi in the NI resources that "hopefully" shows how this is done.


That VI is not creating controls "on-the-fly". (By the way, Ben, I STILL love altenbach's picture!). What it's actually doing is simply hiding/unhiding controls.

This is essentially the same thing that the "Prompt User" dynamic VI does with the Boolean buttons.

 

If you truly need to do something dynamic then you are going to have to do a lot more work, as alluded to in the threads that Ben linked to.

0 Kudos
Message 4 of 11
(4,444 Views)

aeastet wrote:

I tried to convert it but get a fatal error. I hope they fix that soon!!! here is a snap shot of the code.


I get the same crash with 2009. It appears to occur when it's accessing the "\resource\XSFP\XSFP map item.ctl" control. At least that's where it stops and generates a "Fatal Internal Error: MemoryManager.cpp, line 547" error. 

0 Kudos
Message 5 of 11
(4,438 Views)

Hi,

 

LV2009 has (severe) problems to convert VIs with an event structure to LV versions before 8.6... So the conversion to LV8.5 should be done in LV8.6!

 

Maybe I will do this - when all that installation stuff is finished (new computer with LV7.1, 8.0, 8.6, and 2009 Smiley Wink )!

Message Edited by GerdW on 01-08-2010 04:44 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(4,427 Views)

irfocus wrote:

 I found a sample vi in the NI resources that "hopefully" shows how this is done.


While I don't really know what "NI resources" are, please always provide a link or detailed description where you found things. Thanks!

Message 7 of 11
(4,414 Views)

Ben wrote:

This is a question that comes up from time to time. Creating controls "on the fly"


Ben please stop bugging other poster in this forumSmiley Very Happy



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 8 of 11
(4,393 Views)

Holy crap...... something so simple!

 

I will review the sample that you recommended this weekend and try to get something working.  Does it make it any simplier to say that I am not trying to make a control but just display an icon?

 

 

0 Kudos
Message 9 of 11
(4,351 Views)

irfocus wrote:

Holy crap...... something so simple!

 

I will review the sample that you recommended this weekend and try to get something working.  Does it make it any simplier to say that I am not trying to make a control but just display an icon?


In that case, just use a picture ring, like the example did. That "Ring" terminal you see on the block diagram is just a picture ring.

Message 10 of 11
(4,346 Views)