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: 

File Dialog

Solved!
Go to solution

Hi,

 

  I would like to use the file dialog option in the LABVIEW to select a specific file. Right now in the file dialog window, we can navigate through the folders i.e we can go back and forth.

 

  My requirement is, I will specify the path from where the file can be selected(among multiple files). But the thing is, I should not be able to navigate through the folders. i.e either I should select a file from that particular folder or I should cancel it.

 

  Is there any option to do this? Can anyone please help me out?

 

Thanks,

Iswarya Venkataraju

0 Kudos
Message 1 of 4
(2,434 Views)
Solution
Accepted by topic author VI1805

Hi Iswarya,

 

make your own dialog window. Use ListFiles functiosn to get a list of all files in your specified folder and use a listbox to display them to the user.

The user can select any file from the listbox - you can get user input easily using an event structure…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,416 Views)

As GerdW suggested this is the common way to restrict the user for the selection of particular set of files.

-----

The best solution is the one you find it by yourself
Message 3 of 4
(2,395 Views)

The File Dialog is just your standard Windows File Dialog window.  If you want to restrict what the user can do, you will have to make your own.  GerdW put up a good suggestion of using a listbox that contains all of the files in that folder.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(2,385 Views)