ClassesClassesClassesClasses | | | | Operators

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

Page not available for the currently selected syntax (programming language).

dev_open_file_dialogdev_open_file_dialogDevOpenFileDialogdev_open_file_dialogDevOpenFileDialogDevOpenFileDialog (Operator)


dev_open_file_dialogdev_open_file_dialogDevOpenFileDialogdev_open_file_dialogDevOpenFileDialogDevOpenFileDialog — Opens a file selection dialog.


dev_open_file_dialog( : : Filter, Mode, Path : Selection)

Herror dev_open_file_dialog(const char* Filter, const char* Mode, const char* Path, char* Selection)

Herror T_dev_open_file_dialog(const Htuple Filter, const Htuple Mode, const Htuple Path, Htuple* Selection)

Herror dev_open_file_dialog(const HTuple& Filter, const HTuple& Mode, const HTuple& Path, char* Selection)

Herror dev_open_file_dialog(const HTuple& Filter, const HTuple& Mode, const HTuple& Path, HTuple* Selection)

void DevOpenFileDialog(const HTuple& Filter, const HTuple& Mode, const HTuple& Path, HTuple* Selection)

void HOperatorSetX.DevOpenFileDialog(
[in] VARIANT Filter, [in] VARIANT Mode, [in] VARIANT Path, [out] VARIANT* Selection)

static void HOperatorSet.DevOpenFileDialog(HTuple filter, HTuple mode, HTuple path, out HTuple selection)


dev_open_file_dialogdev_open_file_dialogDevOpenFileDialogdev_open_file_dialogDevOpenFileDialogDevOpenFileDialog opens a file selection dialog for reading one file (ModeModeModeModeModemode = 'read'"read""read""read""read""read"), reading one or more files (ModeModeModeModeModemode = 'read_multi'"read_multi""read_multi""read_multi""read_multi""read_multi"), writing (ModeModeModeModeModemode = 'write'"write""write""write""write""write") a file or choosing (ModeModeModeModeModemode = 'dir'"dir""dir""dir""dir""dir") a directory. If ModeModeModeModeModemode is set to 'default'"default""default""default""default""default" and FilterFilterFilterFilterFilterfilter is set to an HALCON operator the type is set to the value the operator would use.

The FilterFilterFilterFilterFilterfilter can be used to select the types of the files which shall be selected for reading or writing. The FilterFilterFilterFilterFilterfilter can be set to an HALCON operator, for example read_imageread_imageReadImageread_imageReadImageReadImage, which should read or write the selected file. In that case, the filter is set appropriate to the files used by the HALCON operator. To select images of type JPEG and TIFF the filter could be set to 'Images (*.jpg *.tif *.tiff)'"Images (*.jpg *.tif *.tiff)""Images (*.jpg *.tif *.tiff)""Images (*.jpg *.tif *.tiff)""Images (*.jpg *.tif *.tiff)""Images (*.jpg *.tif *.tiff)" or 'JPEG Files (*.jpg);;TIFF-Files (*.tif *.tiff)'"JPEG Files (*.jpg);;TIFF-Files (*.tif *.tiff)""JPEG Files (*.jpg);;TIFF-Files (*.tif *.tiff)""JPEG Files (*.jpg);;TIFF-Files (*.tif *.tiff)""JPEG Files (*.jpg);;TIFF-Files (*.tif *.tiff)""JPEG Files (*.jpg);;TIFF-Files (*.tif *.tiff)". In the first case, by selecting the entry 'Images' all supported images files are displayed together. In the second case it is possible to choose between JPEG Files or TIFF Files. The Filter is not case sensitive, therefore the same results are supplied by 'JPEG Files (*.jpg)'"JPEG Files (*.jpg)""JPEG Files (*.jpg)""JPEG Files (*.jpg)""JPEG Files (*.jpg)""JPEG Files (*.jpg)" and 'JPEG Files (*.JPG)'"JPEG Files (*.JPG)""JPEG Files (*.JPG)""JPEG Files (*.JPG)""JPEG Files (*.JPG)""JPEG Files (*.JPG)". The 'All Files (*)'"All Files (*)""All Files (*)""All Files (*)""All Files (*)""All Files (*)" is always added. To combine more than one filter you have to separate them by ';;'";;"";;"";;"";;"";;".


The filter 'Images (*.jpg *.tiff *.tif)'"Images (*.jpg *.tiff *.tif)""Images (*.jpg *.tiff *.tif)""Images (*.jpg *.tiff *.tif)""Images (*.jpg *.tiff *.tif)""Images (*.jpg *.tiff *.tif)" lists all files with the extensions jpg,tiff und tif.

The filter 'JPEG Files (*.jpg)'"JPEG Files (*.jpg)""JPEG Files (*.jpg)""JPEG Files (*.jpg)""JPEG Files (*.jpg)""JPEG Files (*.jpg)" lists all files with the extension jpg

Combination of 3 filters: 'Images (*.jpg *.tiff *.tif);;JPEG Files (*.jpg);;TIFF Files (*.tiff *.tif)'"Images (*.jpg *.tiff *.tif);;JPEG Files (*.jpg);;TIFF Files (*.tiff *.tif)""Images (*.jpg *.tiff *.tif);;JPEG Files (*.jpg);;TIFF Files (*.tiff *.tif)""Images (*.jpg *.tiff *.tif);;JPEG Files (*.jpg);;TIFF Files (*.tiff *.tif)""Images (*.jpg *.tiff *.tif);;JPEG Files (*.jpg);;TIFF Files (*.tiff *.tif)""Images (*.jpg *.tiff *.tif);;JPEG Files (*.jpg);;TIFF Files (*.tiff *.tif)"

The PathPathPathPathPathpath can be used to set the working directory. If PathPathPathPathPathpath is set to 'default'"default""default""default""default""default" the working directory is set to the last one used for this type of ModeModeModeModeModemode.

After a successful execution the SelectionSelectionSelectionSelectionSelectionselection contains the selected files or file.


This operator is not supported for code export.


FilterFilterFilterFilterFilterfilter (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Type of file or files to select.

ModeModeModeModeModemode (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Mode of the file selection dialog.

Default value: 'default' "default" "default" "default" "default" "default"

List of values: 'default'"default""default""default""default""default", 'dir'"dir""dir""dir""dir""dir", 'read'"read""read""read""read""read", 'read_multi'"read_multi""read_multi""read_multi""read_multi""read_multi", 'write'"write""write""write""write""write"

PathPathPathPathPathpath (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Working directory.

Default value: 'default' "default" "default" "default" "default" "default"

SelectionSelectionSelectionSelectionSelectionselection (output_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Selected file names.

Default value: 'default' "default" "default" "default" "default" "default"

Example (HDevelop)

dev_open_file_dialog ('read_image', 'default','c:/',Selection)
read_image(ToolId, Selection)


If the values of the specified parameters are correct dev_open_file_dialogdev_open_file_dialogDevOpenFileDialogdev_open_file_dialogDevOpenFileDialogDevOpenFileDialog returns 2 (H_MSG_TRUE). Otherwise an exception is raised and an error code returned.



See also




ClassesClassesClassesClasses | | | | Operators