LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to open multi-files at the same time on the Mac OsX

There is one example how to open multi-files at the same time but it is just for Windows.
But how to do it using Mac OsX?
0 Kudos
Message 1 of 8
(3,164 Views)
I am not familiar with the Windows example you mention, but do use the Mac. How do you want to select the files to open? Do you have a list, or do you want to open all the files in a folder, or something else? Give us some specifics and someone will probably be able to suggest a soution for you.

Lynn
0 Kudos
Message 2 of 8
(3,155 Views)
Opening multiple files (on any platform) is the same.

For i = 0 to NFiles - 1
Refnum[i] = Open File (Path[i])

{ Do stuff with open files - read this one, write that one)

For i = 0 to NFiles - 1
Close File (RefNum[i])


Error checking is left as an exercise for the reader.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 8
(3,153 Views)
Lynn:

Here is the example for windows:

http://forums.ni.com/ni/board/message?board.id=170&message.id=142151&query.id=59085#M142151

It uses calls to Windows DLLs

CoastalMaineBird:

thanks, but with this method you have to choose the new file each time. You cann't chose 2 or more files simultaneously.
0 Kudos
Message 4 of 8
(3,142 Views)
You cann't chose 2 or more files simultaneously.


Sorry - you asked how to OPEN multiple files.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 8
(3,136 Views)
If you want to CHOOSE multiple files in one dialog, I would write my own dialog.


You basically LIST FILES from the folder you want, put the names into a list box, and allow the list box to have 1 or more items selected. Then you get an array of indexes of which items are selected.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 8
(3,136 Views)
Good idea, thank you very much, i will try it!
0 Kudos
Message 7 of 8
(3,133 Views)
It looks like that Windoze .llb simply creates an array of paths of the files selected by the user: text files, Word files, or all files. In a VI not included it apparently loops through the array of paths and opens the files. You can do all that with built-in LV file handling functions in a manner described by CoastalMaineBird above and the result should be platform-independent.

Lynn
0 Kudos
Message 8 of 8
(3,129 Views)