auto_GetFileNameDialogΒΆ
auto_GetFileNameDialog displays a dialog box which can be used to select up to 16 file names. The function can be used within an automation script.
-
svFilename = auto_GetFileNameDialog()
-
svFilename = auto_GetFileNameDialog(nFiles)
-
svFilename = auto_GetFileNameDialog(nFiles, ssTitle)
Return Value
svFilename is a string vector with the selected file names. If the user clicks
the Cancel button, the function returns a string "DLG_CANCEL"
. The function
provides valid file names. If the user does not want to choose a file name for a
field, they should choose the character string "---------------"
.
Parameters
-
nFiles
nFiles is the number of file names wanted. The number must lie in the range 1 and 16. If this parameter is not given, up to 8 files can be chosen.
-
ssTitle
Optional dialog title. A title given with ssTitle replaces the standard title.
Comment
The function searches the search directory for file names that match the search filter.
To change the search filter, choose the Search filter button. In the
following dialog box, the search directory and the search filter can be changed.
If the files are to be searched in different directories, each directory name
must be separated by a semi colon. The asterisk (*
) and question mark (?
)
symbols can be used in the filter: an asterix represents zero, one or more
characters; a question mark represents one character.
For Excel files, the table name will appear in square brackets behind the file name.
Example
...
svFilename = auto_GetFileNameDialog(4);
if (svFilename[1] == "DLG_CANCEL") {
return;
}
NumberOfFiles = len(svFilename);
for (i in 1:NumberOfFiles) {
svFilename[i] = auto_ImportData(svFilename[i]);
auto_LoadDataset("Diagram 1", "N", "Mom");
auto_LoadDataset("Diagram 1", "N", "be");
auto_LoadDataset("Diagram 1", "N", "NOx");
}
...
See also
id-1661890