.. highlightlang:: us .. index:: auto_GetFileNameDialog .. _auto_getfilenamedialog: auto_GetFileNameDialog ====================== .. us.tag auto_GetFileNameDialog ENGLISH DialogBoxes :ref:`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. .. function:: svFilename = auto_GetFileNameDialog() svFilename = auto_GetFileNameDialog(nFiles) svFilename = auto_GetFileNameDialog(nFiles, ssTitle) .. us.return **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 ``"---------------"``. .. us.params **Parameters** .. uparam:: 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. .. uparam:: ssTitle Optional dialog title. A title given with *ssTitle* replaces the standard title. .. us.comment **Comment** The function searches the search directory for file names that match the search filter. .. image:: S:/uniplot-obj/images/auto_ChooseFile-en.* 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. .. image:: S:/uniplot-obj/images/autoSearchFilter-en.* For Excel files, the table name will appear in square brackets behind the file name. .. us.example **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"); } ... .. seealso:: :ref:`overview-automation`, :ref:`auto_ImportData`, :ref:`auto_LoadDataset` :sub:`id-1661890`