LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add multiple filter options in file dialog

Solved!
Go to solution

I would like to create a file dialog with multiple filter options as shown in the attached image.  Notice that there are three different entries in the filter listbox at the bottom right of the image.  The displayed files will change depending on which filter item is selected.  The pattern input of the file dialog express VI lets the filter be specified and multiple patterns can be specified by separating them with semicolons (eg. *.txt;*.odt), but this will put all the patterns on a single line of the filter listbox and will show all the specified file patterns simultaneously when that filter item is selected (the other filter item is *.*).  After a little searching, I found a description of how to do what I want here https://forums.ni.com/t5/LabVIEW/multiples-patterns-in-File-Dialog/td-p/1122333 and here https://forums.ni.com/t5/LabVIEW/File-Dialog-Details-View-and-Multiple-Selections-for-View-File/m-p/....  I got this to work satisfactorily in LabVIEW 2015, but unfortunately it does not seem to work in LabVIEW 2019 (I get the error message shown in an attached image).  A VI that does what I want is attached (LabVIEW 2015 file format).  It does not work when converted to LabVIEW 2019.  I have also tried using the .NET OpenFileDialog and SaveFileDialog methods, which almost do what I want, but they don't give the ability to change the button text (like the express VI file dialog does) in an easy way.  Any thoughts on how to accomplish the desired outcome in LabVIEW 2019?  Thanks in advance for any suggestions.

0 Kudos
Message 1 of 3
(2,659 Views)
0 Kudos
Message 2 of 3
(2,656 Views)
Solution
Accepted by topic author cbfsystems

Thank you for the link to the related information.  I decided to use the .NET file dialogs.  That doesn't give me the option to change the text on the Open/Save button, but I dealt with that by using a case structure to select the .Net methods OpenFileDialog or SaveFileDialog depending on what I want to do.  This gives me two different options for the button label (Open or Save).

0 Kudos
Message 3 of 3
(2,532 Views)