LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Basic dialog popup subvi loading question

Solved!
Go to solution

I made a simple custom dialog that basically takes a boolean input to indicate if it has 1 button or 2 buttons, a boolean to indicate if it's single lined message or multilined message, and 4 string inputs that modifies the text property of the buttons/message box.

 

The subvi is used in multiple places in top level VI to popup alerts/warning messages in the front panel. It is set as modal window. The weird thing is, on my dev computer, the custom dialog works fine as expected and loads the strings properly and quickly.

 

However when i export to an exe to a slower 1.8ghz cpu computer, the second time I call the subvi it would briefly show the messages/buttons from the first time it was called, flash white and then update with the input given.

 

ex)

First Subvi call: it popsup "Save file?" with 1 button "Ok"

After clicking Ok and closing the subvi front panel.

In another while loop it calls the subvi with new input:  "Load File?" with 2 buttons "yes", "no" for button text.

It instead briefly show "Save File" message again with 1 button "Ok", before flashing white and updating the ui to "Load File" with 2 buttons.

 

Is there some way to fix this issue? It can also first display the default message which is blank for me, before updating with the input.

 

Below is the custom dialog block diagram.

dialog.jpg

 

 

 

0 Kudos
Message 1 of 4
(1,930 Views)
Solution
Accepted by topic author diluc99

Don't make the VI automatically show\hide itself.

 

You can turn this of in the VI properties dialog.

 

Do the initialization, use an invoke node (open) to show the VIs front panel, when done, close it with an invoke node (close).

0 Kudos
Message 2 of 4
(1,869 Views)

Ok wow thanks, that seems to fixed my problem!

Got a followup question, is manually doing the invoke open/close the normal process for doing pop up subvis?

0 Kudos
Message 3 of 4
(1,859 Views)

@diluc99 wrote:

Ok wow thanks, that seems to fixed my problem!

Got a followup question, is manually doing the invoke open/close the normal process for doing pop up subvis?


Setting it in the VI properties is great, if you can get away with it.

 

It doesn't work in a few cases. One is if the VI has initialization code that takes a while. The other is if you dynamically start the VI (VI Server, run method, call by reference). Those properties are ignored then.

Message 4 of 4
(1,849 Views)