(getfiled title filename ext flags)
Display the Select File dialog box.
This function displays the operating system's file dialog box, which allows the user to select a file.
The title argument is the title of the file dialog box; this appears on the title bar. To create a blank titlebar, type " ", but you cannot leave the argument blank.
The filename argument is the default filename that appears highlighted in the File name portion of the dialog box. For no filename, type " ", but you cannot leave the argument blank.
The ext argument specifies the filetype, such as "dwg", "txt", or "lsp". When the argument is " " , no filetype is specified. To specify all filetypes, use "*" for the argument.
The flags argument is a bitcode that specifies options for getfiled.
Bit code | Meaning |
---|---|
1 | Warn user about overwriting an existing file. |
4 | The user can change the extension. |
8 | Use the progeCAD search path and only the name of the file, not the path spec. |
You can sum the bits to specify more than one option. For example, bit code 5 is equal to the bits 1 and 4 added together, meaning the user will be warned about overwriting an existing file and is allowed to change the extension.
Examples
(getfiled "Drawing Files" " " "DWG" 2)
(getfiled "Lisp Files" "sample.lsp" "LSP" 6)
(getfiled "Hey! Pick a File:" "ICAD" "LSP" 4)