ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Open Dialog / multiselect / GetOpenFileName API Call

Hi!

Is there a possibility to select and open more then one file in some of the
standard file dialogs under LabView at the same time?
A lot of windows programs are supporting multi file selection in their file
open dialog.
I tried to call the GetOpenFileNameW function of the comdlg32.dll but I've
got some problems with the datatype it needs. Non zero-length strings result
to a lot of strange characters in the dialog.
0 Kudos
Message 1 of 4
(5,380 Views)
Maybe I'm oversimplifying your question but I downloaded a VI from NI which
acts like an open file dialog in "Windows" and allows you to multi-select.

Go to the Developer Zone and search for "multiple file selection dialog box"

Andy.
0 Kudos
Message 2 of 4
(5,380 Views)
Hi!

>Maybe I'm oversimplifying your question but I downloaded a VI from NI which
>acts like an open file dialog in "Windows" and allows you to multi-select.
>
>Go to the Developer Zone and search for "multiple file selection dialog
box"
Thank you - I found it. Don't know why I did not find it yesterday.
Unfortunatelly it does not do what I really want (but maybe I can modify it
by myselve).
The problem is, that I would like to select about 1000 files and the VI does
not support
a multiselection mode using the shift-key like under windows (or did I
overlook something?).
Clicking to every single file is a bit too much 😉

bye
Andreas
0 Kudos
Message 3 of 4
(5,380 Views)
Hi,

It can be done, the trick is, indeed, to 'decode' the return message. The
returned message is an 'array' of strings, inLV a string, with elements
seperated with 'NULL', the string ends with 'NULL','NULL', if recall
correcttly.

Another thing is the API you call; GetOpenFileNameW will return names in UNI
code, use GetOPenFileNameA will return names in ASCII, wich is a lot easier
to work with in LV.

Regard,

Wiebe Walstra.

--
AIR technical Automation
www.air.nl
"Andreas Schmack" wrote in message
news:98ldah$ev6$1@proxy.fe.internet.bosch.com...
Hi!

Is there a possibility to select and open more then one file in some of the
standard file dialogs under LabView at the same time?
A lot of windows programs are supporting multi file
selection in their file
open dialog.
I tried to call the GetOpenFileNameW function of the comdlg32.dll but I've
got some problems with the datatype it needs. Non zero-length strings result
to a lot of strange characters in the dialog.
0 Kudos
Message 4 of 4
(5,379 Views)