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 - How can I remove/Disable "All files(*.*)" option.

Hi,

 

In Windows OS  how can I remove/Disable  "All files(*.*)"  option in File Dialog. Currently i am using Labview14.0 Version.

NI CLDlabview-programming-fundamentalslabview-environment
0 Kudos
Message 1 of 9
(19,175 Views)

This window is from the OS, so you cannot change it easily without playing with some WinAPI things I think...

The easiest way to solve your problem to code your own pop-up dialog. In this subVI you can create for example a Listbox to populate files, and only let the user see/select those you want.

 

 

 

0 Kudos
Message 2 of 9
(19,160 Views)

Thnak you for reply.. where  WinAPI things  are located and how to disable it..

NI CLDlabview-programming-fundamentalslabview-environment
0 Kudos
Message 3 of 9
(19,143 Views)

I have never worked with WinAPI functions/dlls from LabVIEW, but I have found some posts dealing with the same problem:

 

http://forums.ni.com/t5/LabVIEW/path-control-limit-extention-type/m-p/221700/highlight/true#M123355

Another long discussion:

https://lavag.org/topic/3834-file-dialog-how-can-i-remove-all-files-pattern/

 

So I cannot help you with this part. But as I recommended, you could code your own File Dialog subVI using LabVIEW file and directory functions plus a Listbox control on your Fron Panel of the subVI.

 

Edit: Workaround --> see the last post in the last link above:

Just use the default File Dialog Express VI, and put it in a while loop. Filter for valid extension, so you do not let the user chose prohibited files... does this solve your problem?

0 Kudos
Message 4 of 9
(19,138 Views)

@veerababu wrote:

Thnak you for reply.. where  WinAPI things  are located and how to disable it..


WinAPI is the official Windows API that any application should interface too when using Windows resources of any kind. LabVIEW does this to call the built in file dialog from Windows. This can be somewhat customized by LabVIEW such as adding extra file endings to the list but there is no way short from hacking into the LabVIEW executable to modify that beyond what the LabVIEW file dialog node allows you to do and there, the All files selection is explicitedly added to every request for this dialog.

 

So no there is no feasable way to remove that entry from the file dialog that LabVIEW shows. You have two options:

 

1) create your own file dialog VI that has the interface you like (but will not look like what the users are normally seeing on the system)

2) create your own code to call the Windows file dialog API.

 

However this second option I can only recommend if you have serious C programming knowledge. Not only do you have to interface the pretty involved Windows API like you would have to do when calling it from C code (with all the little and not so little intrinsacies of C programming) but you have to also know how a C compiler normally creates code to call functions in order to make sure that what you configure in the LabVIEW Call Library Node actually matches what the Windows function expects. And let the File Dialog API have a rather complicated structure as parameter which is almost impossible to interface directly to the LabVIEW Call Library Node without some intermediate DLL that you would have to write in C.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 9
(19,117 Views)

@veerababu wrote:

Hi,

 

In Windows OS  how can I remove/Disable  "All files(*.*)"  option in File Dialog. Currently i am using Labview14.0 Version.


Provide with the pattern label input as *.png or some other extension of your choice then you wont see all files in your browser.

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 9
(19,102 Views)

@palanivelthiruvenkadam@gmail.com wrote:

@veerababu wrote:

Hi,

 

In Windows OS  how can I remove/Disable  "All files(*.*)"  option in File Dialog. Currently i am using Labview14.0 Version.


Provide with the pattern label input as *.png or some other extension of your choice then you wont see all files in your browser.

 


You did not understand the request. Even if you set *.png for the Express VI, you will still have the option to set it back to *.*. Try it yourself...

 

Untitled.png

0 Kudos
Message 7 of 9
(19,096 Views)

I am using same file promte but i dont want  show  AllFile(*.*) enable  opstion to user. i want  it shout be disabled mode. how can i do it?

NI CLDlabview-programming-fundamentalslabview-environment
0 Kudos
Message 8 of 9
(19,093 Views)

@veerababu wrote:

I am using same file promte but i dont want  show  AllFile(*.*) enable  opstion to user. i want  it shout be disabled mode. how can i do it?


Did you read the response from me and rolfk ? 🙂

0 Kudos
Message 9 of 9
(19,089 Views)