LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Dialog (Details View and Multiple Selections for View File Type)

Actually there are multiple posts both here on NI as well as over on lavag.org that document this and on lava there is at least one post that provides a ready made VIs already.

 

https://lavag.org/topic/12356-multiple-patterns-in-labview-file-dialog/#comment-74170

Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 17
(2,205 Views)

Thank you, I was looking for this kind of function!!! 🙂

0 Kudos
Message 12 of 17
(2,182 Views)

Hi gamberetto,

 

I have tried to use your create patterns VI in LabVIEW 2019 (32bits), and although it works fine, when I call File Dialog, I get the following error: "LabVIEW: (Hex 0x692) This string contains an unexpected null character."

 

I also get the same error if I use a string constant with the pattern text told by MikaelH, so ther problem is not with your code but with LabVIEW File Dialog.

 

Can someone tell me it this solution still Works in LabVIEW 2019?

 

Thanks in advance.

 

 

0 Kudos
Message 13 of 17
(1,945 Views)

Answering myself

 

After doing a deeper search in the forum I have found that this issue is already known: https://forums.ni.com/t5/LabVIEW/Null-File-Dialog-Behavior-in-2019-amp-Forward-Compatible-Run/m-p/39...

 

The short answer: we can no use this feature in LabVIEW 2019

 

 

0 Kudos
Message 14 of 17
(1,931 Views)

Merging the code from gamberetto with the use of .NET File dialog form Daniel_H1 found here, I have implemented a subVI for selecting one or multiple files using .NET.

 

It works almost as LabVIEW built-in Express File Dialog, so you can replace it in your code without mayor changes. The diferences are:

 

  • No button label input
  • patterns (all files) and pattern label inputs are replaced with an array of patterns like the one from gamberetto
  • Added a Multiselect input to allow sellect multiple files (FALSE by default)
  • Two outputs: selected path [path] for single file selection and selected paths [array of paths] for multiple selections.
  • It only works in Windows
0 Kudos
Message 15 of 17
(1,911 Views)

@MikaelH wrote:

This is how I do it:

 pattern.png

Cheers,

Mikael


 

Reopening a really old topic but, As of LV2019 this does not work anymore, and it has something to do with the Windows File Dialog API.

 

I was wondering if you have a solution for newer version of LabVIEW? especially LV2020 and up.

 

 

0 Kudos
Message 16 of 17
(1,215 Views)

Playing around with the .net file dialog box link given earlier, I came up with this...

 

File Dialog box example.png

 

The example I used for the filter list is as follows:

 

Image Files|*.BMP;*.JPG;*.GIF;*.PNG|Text files|*.txt|LabVIEW Projects|*.lvproj|LabVIEW Files|*.vi;*.ctl;*.vim;*.llb|Zip|*.zip;*.7z;*.gzip;*.rar;*.tar|All files|*.*

 

It looks like this...

Frozen_0-1705517450585.png

 

Hope this helps.

---------------------------------------------
Certified LabVIEW Developer (CLD)
Message 17 of 17
(1,161 Views)