Command: FileDlgShow

DIAdem 2018 Help

Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)

DIAdem 2012 Help
DIAdem 2014 Help
DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help

Calls the file selection dialog box.

ReturnValue = FileDlgShow(FileDlgName, [FileDlgFilt], [FileDlgCaption], [FileDlgMultiSelect])

Input Parameters

FileDlgName Specifies a file. You can also specify the path and the filename extension.
String variable
Note  If you do not specify a path in the FileDlgName variable, DIAdem loads the file from the SCRIPT user folder or saves the file in the SCRIPT user folder. If you do not enter a filename extension, DIAdem determines the filename extension from the variable FileDlgFilt.
[FileDlgFilt] Specifies the file type.
String variable

The FileDlgFilt variable consists of the description and the file filter. Separate the description and the file filter with a comma. DIAdem displays the description in the file dialog box. The file filter limits the number of displayed files. For example, if you assign the value "Script Files,*.VBS" to the variable FileDlgFilt, DIAdem enters the text "Script Files" into the dialog box and filters the files with *.VBS. You also can specify several file filters if you separate them with semicolons, for example, Excel Files, *.csv;*.xls. You can also assign to the variable FileDlgFilt several combinations of descriptions and file filters by separating them with a vertical line, for example, "Script Files,*.VBS|List Files,*.LST".

[FileDlgCaption] Specifies the dialog box caption.
String variable
Note  If you do not assign a value to the FileDlgCaption variable, DIAdem generates the caption automatically.
[FileDlgMultiSelect] Specifies whether one file or multiple files can be selected. The default value is FALSE and specifies that you can select only one file.
Boolean variable
Access: Read only

Return Parameters

ReturnValue Receives the status of a dialog box after you exit the dialog box. The return value is a DlgState type.
Enumeration variable
Enumeration variable with the following selection terms
Script Term Interface Term, Explanation
Clicked OK
Clicked Cancel
Clicked No
Dialog box was not displayed
FileDlgNameListReceives a field with all selected files including the path.


In the following example, DIAdem opens the file selection dialog box and loads the selected files.

Dim iCount
Call FileDlgShow(DataReadPath, "TDM Files,*.tdm|DAT Files,*.dat|Excel Files, *.csv;*.xls", "Data selection", True)
For iCount = 0 To Ubound(FileDlgNameList)
  Call DataFileLoad(FileDlgNameList(iCount))


Not Helpful