ObjectDCL Banner

MultiFileDialog Method

Description

This method will prompt the user to select one or more files and will return a list of the files selected including there full paths. When calling this method you have the option of not specifying any file filter, this will default to "AutoCAD Drawing (*.dwg)|*.dwg".

For the occasion that a different file filter or filters is required you can pass a simple string or a list of string indicating the filters to be used. Please note when specifying a filter the description of the filter must always be separated by a | symbol (this is most likely the character above the character on your keyboard). Some other examples are listed below.

Parameters

ExtensionFilter
String or list of strings identifying the extension filters to use. The parameter can be omitted altogether.
Title
String specifying the dialog title.
DefaultDirectory
String specifying the default folder to browse from.

Return Values

Returns the following according to the situation:

  • List of strings representing the user selection.
  • Nil if the user canceled.

AutoLISP Syntax

CopyCode imageCopy Code
(Odcl_Control_MultiFileDialog 
		(list
			ExtensionFilter1 [as String]
			ExtensionFilter2 [as String]
			...
			ExtensionFilterN [as String]
		)
		[Optional] Title [as String]
		[Optional] DefaultDirectory [as String])

CopyCode imageCopy Code
(Odcl_Control_MultiFileDialog 
		[Optional] ExtensionFilter [as String]
		[Optional] Title [as String]
		[Optional] DefaultDirectory [as String])

Example

CopyCode imageCopy Code
; Browse for pictures
(Odcl_MultiFileDialog
	(list 	
		"Picture Files|*.bmp;*.jpg;*.ico;*.dib"
		"Bitmaps (*.bmp,*.dib)|*.bmp;*.dib"
		"JPEG Files (*.jpg)|*.jpg"
		"Icon Files (*.ico)|*.ico"
	)
	"Select the picture file(s)"
	"c:\pictures"
)