LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically change window appearance

Hello together
 
I have a quite simple question: Is it possible to use the same subvi once to appear as dialog and once in default mode?
This should be settable during run time. I am sure, that there are one thousand ways to go around this problem in my application. However, I am also personally interested if this can be done.
 
Thanks for anyone who gives me advice
 
Woodi
0 Kudos
Message 1 of 16
(4,107 Views)

Hi Woodi

Using property-nodes you can do a lot. Have a look at it..

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 16
(4,103 Views)
Hi Woodi,

here's a quick example and a pisture to show you the possibilities you have with a property node 😉





Hope this helps

Message Edité par TiTou le 04-13-2006 09:04 AM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Download All
Message 3 of 16
(4,101 Views)

Hello TiTou

Thank's a lot for your Help. This is exactly what I want.

Now I can run a subvi in background with default settings, or the user can make some changes if the window appears as dialog.

Woodi

0 Kudos
Message 4 of 16
(4,082 Views)
Salut TiTou
 
There has come up another question.
 
I can now previously decide wheter a subVi is run in background or comes up as dialog. In the first case, some parameters are calculated without user interaction, in the second case, the user can make some changes and influence the calculation. The general advantage is, that i can use the same vi. This works all fine.
 
But how can I access the data this subvi gives? Respectively give some values to the subvi?
 
I guess I have run into a tricky and silly situation. Of course I could use global variables or alternatively do it completely different, but even though I am interested going this way.
 
Have you got an idea?
 
Greetings
 
 
Woodi
0 Kudos
Message 5 of 16
(4,076 Views)

You can wire it as a normal subvi. Just connect the controls and indicators to terminals and it works.

If you want it to work as dialog don't wire these connectors otherwise you can use it as subvi.

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 6 of 16
(4,069 Views)
Woodi,

*** do you speak french or just a few words like "salut" Smiley Surprised ?? ***

Global variable are not the appropriate tool to pass data to a sub-VI even if they could do the job.

It is not clear for me if you only want to get output datas from the subVI or if you also want to input datas from the main VI and also waht kind of data will you have to transfer ? The best way might be different if it's a large 2D array of clusters or if it's just a boolean 😉

Here is an idea...


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Download All
Message 7 of 16
(4,067 Views)
As Becktho pointed, you don't necessarily have to run the VI dynamically... if you don't want it to show up just put the sub vi in the main vi and connect the inputs and outputs.

😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 8 of 16
(4,063 Views)
Here's an example how I could imagine to do it - it's definitely not the best solution, but it shows you how you could do it.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Download All
Message 9 of 16
(4,058 Views)
TiTou - just by wiring the vi the job is not done. You have to set its appearence, so that it opens when called - the problem is, that it also opens if you use it as subvi which results in a short flicker of it.
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 10 of 16
(4,057 Views)