LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

current folder file dialog

I have been using a file dialog popup that allows selection of multiple files from this thread, posted by Wiebe. Works great, I highly recommend it. However, I was wondering if anyone know of a way to include the button "Current Folder" like you see in many Windows file dialog boxes. I want to add a recursive file opener, so it would be nice to take a folder from the dialog box and recursively get all of the files, OR be able to select multiple files, as I currently do. Any ideas?
 
Michael
0 Kudos
Message 1 of 8
(4,556 Views)

I discovered with the Labview "File Dialog" Express VI in 8.2 in the Advanced Filed functions you can choose if you can select multiple files OR a single folder (among other things). However, I am confused about its structure. If you convert the Express VI by opening the FP, you find another subVI, which is made of a function called "File Dialog" that allows you to select multiple files OR a single folder (among other things. should be noted you can only select one of these options). This subVI with the File Dialog function is PROTECTED and REENTRANT. You can change it of course by making it unprotected and non-reentrant, and then you can copy the File Dialog function and use it. My question is: why is it reentrant? It seems to me that you would only want one call to open a file or folder at a time, not several simultaneously. What would be the use in that? Am I missing the point about this subVI being reentrant? See attached for screen shots.

 

Michael

0 Kudos
Message 2 of 8
(4,542 Views)
Actually, I found the "subFileDialog" to be reentrant and locked, not the item that you're pointing to. As to why it's reentrant, can't really say. Doesn't make much sense to me either, but maybe I'm missing something that was considered when the VI was created by NI. Perhaps someone at NI wants to comment?
0 Kudos
Message 3 of 8
(4,528 Views)
It allows you to have multiple file dialog open at the same time?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 8
(4,517 Views)
Well, yes, but as the original post asked: what would be the point in that?
0 Kudos
Message 5 of 8
(4,515 Views)


@miguelc wrote:
II was wondering if anyone know of a way to include the button "Current Folder" like you see in many Windows file dialog boxes.

Hi,

Will the attched VI help you to a smaller extent ?

Are you looking something kike this ?

- Partha ( CLD until Oct 2027 🙂 )
Message 6 of 8
(4,514 Views)

Thanks Parthabe. Thats a good solution; when I had first posted I was looking for something like the screen shot attached. I can do that with the File Dialog VI, and with a seperate File Dialog VI select multiple files (which I spent a lot of time researching on these forums, with varying methods of doing so, before I actually found that the File Dialog VI lets you do it) so that problem is solved. My reply to myself is the question I'm still wondering about, why the File Dialog VI has an inner subFileDialog that is protected and reentrant, which ties with the other question of why the regular File Dialog function is not available. If I subVI containing it is protected, I assume there is a reason I shouldn't be using the File Dialog function on its own.

Michael

0 Kudos
Message 7 of 8
(4,506 Views)
I found a way to do exactly what you're asking. I am using 8.5.1 in XP. On the front panel add a Path control from Controls > Modern > String & Path > File Path Control. The added control has a folder icon to the right of the file path. Clicking on this opens a popup with the option of selecting "Current folder".
0 Kudos
Message 8 of 8
(4,140 Views)