TwoFileSelectionDialog

Opens a dialog to define two file names. While originally intended for file parsing applications, this dialog function has been made general purpose for any application where the user needs to be prompted to select two file names. The dialog has file selection buttons which open a typical File Selection Dialog. The first file is the Input file and must exist on disk when the dialog is closed. The second file is the Output file and doesn't need to exist when the dialog is closed.

TwoFileSelectionDialog Configured as the Encryption Dialog

The first argument defines the two file names and the description combo box text.

The second argument configures the displayed text on the dialog including the caption, title, group box titles and so on.

The third argument configures how the program remembers the input and output file names, description text and checkbox state. Each of these strings is a key in the user's configuration file, allowing the dialog to be used for many different applications with different memories. These remembered values will be displayed in the file and descriptive text combo boxes the next time the dialog is opened. The program remembers the last 10 file and description entries.

Arguments

Number Type Compulsory Default Description

1

string array

No

<<empty>>

Initial files and description combo box text

2

string array

No

<<empty>>

Dialog Configuration

3

string array

No

<<empty>>

File history an other configuration

Argument 1

The argument is a string array of length 3 which defines the input file, output file and description text.

Index Purpose Notes Default
0 Input file name populates the input file name combo box. <<empty>>
1 Output file name populates the output file name combo box. <<empty>>
2 Description text populates the description combo box. <<empty>>

Argument 2

The argument is a string array of length 13 which defines the dialog text.

Index Purpose Notes Default
0 Dialog Box Caption <<empty>>
1 Box Title <<empty>>
2 Upper group box title Description
3 Upper group box text <<empty>>
4 Input file group box title Input file
5 Input group box text <<empty>>
6 Output file group box title Output file
7 Output group box text <<empty>>
8 Checkbox text Open output file when complete?
9 Description group box title File description (optional)
10 Description group box text <<empty>>
11 Flag to hide the description groupbox If set to '1' the description groupbox will be hidden. '1'
12 Help context id For internal use only <<empty>>

Argument 3

The argument is a string array of length 8 which defines the memory and file selection dialog filters.

Index Purpose Notes Default
0 Input file history key name Any text without strings, if omitted or empty string, no files will be remembered. <<empty>>
1 Output file history key name Any text without strings, if omitted or empty string, no files will be remembered. <<empty>>
2 Description history key name Any text without strings, if omitted or empty string, no description text will be remembered. <<empty>>
3 Checkbox history key name Any text without strings, if omitted or empty string, no checkbox state will be remembered. Unlike the other memories, this only remembers the last checkbox state. <<empty>>
4 Input file type SIMetrix/SIMPLIS has several internally defined (and user customizable) input file types.
'Schematic' Schematic files
'Model' Model files
'Netlist' Netlist files
'Graph' Graph binary files
'Script' Script files
'VerilogA' Verilog-A files
'VerilogHDL' Verilog-HDL files
'Data' Data files
'Text' Text files
'AsciiFileEditor' Schematic ASCII Files
'LogicDef' Logic definition files used with arbitrary logic block
'Init' SIMPLIS Initializaition files.
An empty string will open the file browser with all files displayed.
<<empty>>
5 Output file type Same as the Input file type but for the output file extension <<empty>>
6 Output file replacement mode
'none' no replacement is performed on the output file string.
'file' the replacement text supplied in index 8 is applied to the end of the file name before the extension. This occurs when the user selects a file using the file browser selection button.
'ext' the replacement text supplied in index 8 is applied to the end of the file extension. This occurs when the user selects a file using the file browser selection button.
7 replacement text for argument 6.

Returns

Return type: string array

The function returns a string array of length 4. The return is in this order:

Index Description
0 Input file name
1 Output file name
2 Description text
3 Checkbox state
If the user selects Cancel the function returns an empty vector.