LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file dialog doesn't show any files

Hy, i'm using a File Dialog to let the user save or load some config-data.

According to the users selection (save or load file) i wire the select mode "existing file" (load file) or "existing or new file" (save file) to the file dialog.
The problem is, that the dialog doesn't show any available files on my disc (neither with "existing file" nor "existing or new file").

I've checked, that it opens the correct folder and that there are files in it. It neither shows any files in my Windows-Folder.

As you can see on my screenshot there aren't any patterns linked to it (there should be one, but for test-reasons i've unlinked it).

That leads me to my second question:

Is there a possibility to prompt the file dialog to automaticaly append the file-extension of the selected file pattern to a selected file (for saving)?

Here's a little snippet of my code:


0 Kudos
Message 1 of 16
(3,722 Views)
Hi suamikim,

first: better use the 'Build Path' function to add filenames/relative paths to a given path. This will take care of special characters like : or \.
2nd: You have to do the filename creation on your own. So check the choosen filename and add the extension if needed.

As can be seen from your picture, the file dialog should work correctly. So I don't know why you cannot see any files in your folder.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 16
(3,713 Views)
Thanks for your answer.
I will use the "Build path" function from now on (haven't realized it till now).

The creation of the filename and appending of the extension is no problem. I just wanted to know, if there is an automatism that i can use (apparently not).

The main problem still exists. I can't see any files in my file dialog:


As you can see there are definitely some files in the selected folder (the path is also correct) and the text box for the filename is empty (overlaid by the info-tooltip)...

Hope anybody can help me with this. I really don't have any clue, what the problem can be!

thanks & regards
0 Kudos
Message 3 of 16
(3,704 Views)
Hi,

did you check for some wierd file access rights/user irghts?
The file dialog also takes settings from the standard windows file dialog, like file order or view options. Maybe in your case there are also some strange settings?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 16
(3,700 Views)
Hi,

did you check for some wierd file access rights/user rights?
The file dialog also takes settings from the standard windows file dialog, like file order or view options. Maybe in your case there are also some strange settings?

Please cross-check this behaviour. Make a small vi containing only the 'file dialog' with wired 'existing file' constant and wired 'start path'. See if this works correctly. After this you have two options: it works, so the problem is within your vi shown in the first post - or it doesn't work, so the problem is within user right settings or similar.

Also a possible reason for your problem:
You try to access a folder inside 'c:\program files'.
This folder is protected by windows! Maybe somehow you're not allowed to look inside those folders using LabView?

Message Edited by GerdW on 12-13-2006 02:24 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 16
(3,698 Views)
Can't find anything weired. Every other application can show a normal file dialog without any problems (haven't tried another labview-app, but that will be my next attempt).

I don't think that there is a problem with the permissions (everything is allowed for administrator, my user & system, so nothing strange) because the reading/saving to/from files works fine...
0 Kudos
Message 6 of 16
(3,691 Views)
Zusatz (hab gerade gesehen, dass du Deutsch sprichst und das fällt mir doch erheblich leichter ;)):

Wenn ich ein "File path"-Control am Front-Panel anbringe und den Datei-Dialog über den normalen Öffnen-Knopf aufrufe funktioniert alles einwandfrei. Außerdem erscheint hier der ganz normale Windows-Dialog und nicht der im Labview-Design (wie am obigen Screenshot).

Kann man vielleicht ohne das "File path"-Control auch irgendwie den normalen Windows-Dialog aus dem Programm heraus aufrufen? Wäre mir sowieso lieber, weil mir der Labview-Dialog einfach nicht so recht gefallen will...

danke, mfg
0 Kudos
Message 7 of 16
(3,685 Views)
Have you tried to "Use native file dialogs" (it's an Option, maybe Miscellaneous) ?. In principle, it should'nt make any difference, but who knows...
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 8 of 16
(3,686 Views)
The "use native file dialog"-option has allready been set, but i've tried it without -> Nothing changed.

What should this option exactly effect?

In my previous post (in german) i've mentioned that the standard file-open-dialog of the "file path"-control works fine.

Folder opened with the standard "file path"-control.
Folder opened with the code i've posted in my first thread.

Is it possible that there is a bug in labview? Same dialog, same folder -> different files shown (so i think we can really elliminate the thought of weired settings).

ps.: Now i've seen the effect of "use native file dialog". When i open the file dialog from the "file path"-control it shows the standard windows-file-dialog (with "use native..." set). Without "use native..." set, it shows the file-dialog in labview-style, but it doesn't change the style of the file-dialog shown programmaticaly with "file dialog"...
0 Kudos
Message 9 of 16
(3,676 Views)
hi suamikim,

i tested the Open Dialog Vi with Labview 7.1 and everything works fine -> windows dialog appeard.

So could you please do two things for me.
Tell me which Labview Version you are using and please send you Vi (if it is not too big) as attachment to the forum.

Thanks
Regards
Dippi
0 Kudos
Message 10 of 16
(3,650 Views)