AfraLISP - Learn AutoLISP for AutoCAD productivity

Previewing DCL Files

by Kenny Ramage

Dialog boxes can be previewed without running the associated AutoLISP code using the Visual LISP editor. This is extremely useful when you are just designing the layout for the dialog box. In fact, the Visual LISP editor also make an excellent editor for DCL files as it colour codes DCL syntax to make it easier to work with.

The image below shows the test_dcl2.dcl DCL file created in the previous tutorial open in the Visual LISP Editor.

If you'd like to learn more about the Visual LISP Editor, start with The Visual LISP Editor - Part 1 tutorial.

Visual LISP Editor

  1. Firstly, open AutoCAD.
  2. Now open the Visual LISP Editor : ToolsAutoLISPVisual LISP Editor
  3. Open the DCL file that you wish to view : FileOpen
  4. Select "DCL Source Files" from the "Files of Type" drop-down menu and then select your DCL file.
  5. Once your DCL file has opened, select : ToolsInterface ToolsPreview DCL in Editor
  6. Enter your dialog name if it is not already displayed.
  7. Select "OK"
  8. The editor flips to AutoCAD and your dialog box is displayed.

Note: If you receive an error message such as ; warning:cannot create tmp file… you will need to set permissions for the folder where the Visual LISP Editor is attempting to create a temporary file. Prodeed as follows:

Security settings
  1. Go to C:\Program Files (or wherever you have AutoCAD installed), right-click the AutoCAD 2010 folder and select "Properties" from the right-click menu and then select the "Security" tab.
  2. Click "Edit" under "Group or User Names", select "Users" and check the "Allow" box next to "Full Control". This will set permisions for "Users" to "Full Control".
  3. Click "Apply" and then click "OK" to close the "Permissions" dialog box.
  4. Finally, click "OK" (or "Apply" if active) to exit the "Properties" dialog box.