Visual LISP provides a tool for previewing dialog boxes defined with DCL.
Note: DCL support in AutoLISP and Visual LISP are limited to Windows only.
Follow these steps to see how to preview a dialog boxed in the Visual LISP Editor.
- In the Visual LISP Editor, click File Open File.
- In the Open File to Edit/View dialog box, in the Files of Type drop-down list, select DCL Source Files. Browse to and select the DCL file you want to preview. Click Open.
- Click Tools Interface Tools Preview DCL in Editor to display a list of all the dialog boxes defined in the current text editor window.
- In the Enter the Dialog Name dialog box, select the dialog box name from the drop-down list that you want to preview and click OK.
- Click the OK or Cancel button to complete previewing the dialog box.
Example
- Copy the following code to the clipboard.
Highlight the DCL code and press Ctrl+C, or right-click and click Copy.
hello : dialog {
label = "Sample Dialog Box";
: text {
label = "Hello, world";
}:
button {
key = "accept";
label = "OK";
is_default = true;
}
}
- In the Visual LISP Editor, click File New File.
- In the new editor window, press Ctrl+V, or right-click and click Paste.
- Click File Save As. In the Save-as dialog box, Save As Type drop-down list, select DCL Source Files. In the File Name field, enter hello.dcl. Browse to a location to store the DCL file and click Save.
Note: You must include the file extension when you specify the file. Visual LISP does not automatically add a .dcl file extension for you.
- Click Tools Interface Tools Preview DCL in Editor to display a list of all the dialog boxes defined in the current text editor window.
- In the Enter the Dialog Name dialog box, select Hello from the drop-down list and click OK.
- Click OK to complete previewing the dialog box.
Note how the text editor color codes the statements in the DCL file. The default color coding scheme is shown in the following table:
DCL default color coding
|
DCL element
|
Color
|
Tiles and tile attributes
|
Blue
|
Strings
|
Magenta
|
Integers
|
Green
|
Real numbers
|
Teal
|
Comments
|
Magenta, on gray background
|
Parentheses
|
Red
|
Preprocessor
|
Dark blue
|
Operators and punctuation
|
Dark red
|
Unrecognized items
(for example, user variables)
|
Black
|