From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Will File Open Dialog run in any thread?

Labview default file dialog vi(Express VI) uses UI thread to load file.
It blocks other UI thread operations.

browse for Folder uses any thread(attached sample VI).

just like that I need wrapper VI to get file path.

0 Kudos
Message 1 of 4
(1,729 Views)

Hmm, well for a dialog a UI thread usage is likely, but you could code your own VI with e.g. an Event Structure, set the properties to open on call and close when finished, and then use that to get a file path.

 

You could call it asynchronously and wait, or more likely just have it in a separate branch of code that whatever you didn't want to block.


GCentral
0 Kudos
Message 2 of 4
(1,671 Views)

Out of curiosity could you explain why this is important?  Usually you WANT everything to stop when a file dialog opens so whatever you are reading/writing doesn't change while the dialog is open. e.g., you select a file but by the time you click the open button, it has been deleted.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 4
(1,646 Views)

There are a few things that appear to use the UI thread (at least back in 2015) that you wouldn't expect, like some VI server calls.

 

https://www.winemantech.com/blog/the-ui-thread-root-loop-and-labview-what-you-need-to-know/

 

I'd be interested to know what the OP is running into though as well, as even though the file dialog uses the UI thread the front panel will still update while the dialog is open.

0 Kudos
Message 4 of 4
(1,635 Views)