취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

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
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 포인트
11/17 메시지
3,411 조회수

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

0 포인트
12/17 메시지
3,388 조회수

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 포인트
13/17 메시지
3,151 조회수

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 포인트
14/17 메시지
3,137 조회수

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 포인트
15/17 메시지
3,117 조회수

@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 포인트
16/17 메시지
2,421 조회수

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.

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
17/17 메시지
2,367 조회수