DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Command: FileDlgShow

Display all  Hide all

Command: FileDlgShow

Calls the file selection dialog box.

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

Input Parameters

FileDlgName Specifies a file. You also can specify the path and the filename extension.
[FileDlgFilt] Specifies the file type.
[FileDlgCaption] Specifies the dialog box caption.
[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.

Return Parameters

ReturnValue Receives the status of a dialog box after you exit the dialog box. The return value is a DlgState type.
FileDlgNameListReceives a field with all selected files including the path.

Examples

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

VBScriptPython

 

If FileDlgShow(DataReadPath, "TDM Files,*.tdm|DAT Files,*.dat|Excel Files, *.csv;*.xls", "Data selection", false) = "IDOk" then
  Call DataFileLoad(FileDlgNameList(0))
Else
  Call MsgBox ("The loading of the data was aborted.")
End If

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

VBScriptPython

 

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))
Next

Was this information helpful?