01-25-2011 04:17 PM
Hi all,
I would like to use the one button dialog that would just showing a message without requiring any user interaction. With the dialog, I only want to display a message for the user. I want the program to continue running without needing user interaction. I just want to let the user know that something happened. I don't need to user to do anything. How do I do that?
Yik
Solved! Go to Solution.
01-25-2011 04:33 PM
You need to call the dialog-VI in a different thread(while-loop) than your main application.
One way of doing this is using a queue. Add the dialog text to the queue in you main thread.
De-queue the dialog text in your second thread and call the dialog-VI with the text you have just de-queued.
This solution is done using a producer-consumer architecture.
See the link below.
http://zone.ni.com/devzone/cda/tut/p/id/3023
The dialog will pop but the main program will keep running.
Good luck
01-25-2011 04:46 PM - edited 01-25-2011 04:56 PM
A more common approach is to use a "Status log" (just a string on the UI that gives the user some idea what is going on.)
Here is a construct I often use (place the control "Status" on the UI, Add a control to the referance to "Status" wire the Connector pane.) This type of action engine (see Ben's excellant nugget) lets you send update messages to the user from anywhere in the application instance space without leaving pop-ups all over the screen.
And should you wish, you can add cases to Show, blink, unblink, highlight, move or Hide the indicator so it peeks out and dances
01-25-2011 04:47 PM
Or...
01-26-2011 09:47 AM
Everything when a condition is met, I want a pop up to appear, so multiple pop up maybe needed. After the pop up appear, I want the program to finish running while leaving the pop up on the screen. I don't want the program to keep up with the pop up. I want the program to create pop up and leave behind (on the screen).
01-26-2011 09:48 AM
That's a create approach, but I do want pop up all over the screen.
01-26-2011 02:49 PM
The easiest method is to use the Status Log described by Jeff Bohrer, but if you insist on having multiple windows popping up, you will need to create a separate VI for each status dialog box that you want to display then use the VI Server to run each VI at the specified time. You will just need to ensure that a False constant is wired to the "Wait Until Done" input of the Run VI invoke node. J-M's post above shows how to call a VI remotely.
01-26-2011 04:28 PM
You could utilize a template (VIT).
01-26-2011 04:46 PM
@J-M wrote:
You could utilize a template (VIT).
This is a perfect application of a template. Good call.