About the Visual LISP Text Editor (AutoLISP)

You will spend much of your time in VLISP creating or modifying AutoLISP programs. VLISP comes with an integrated text editor for you to use with AutoLISP code.

To see how the text editor window displays code, open a sample AutoLISP program. Begin with the drawline.lsp file provided with VLISP.

Note: The sample files are only included if you customize the installation and select the Visual LISP Samples item. If you previously installed AutoCAD and did not install the samples, rerun the install, choose Custom, and select the Visual LISP Samples item.

The VLISP text editor is much more than a writing tool, it's a central component of the VLISP programming environment. To appreciate the versatility and value of the VLISP text editor, you need to be familiar with the AutoLISP language. If you are not yet familiar with AutoLISP, see the following topics:

Here are some of the major features of the text editor:

Color Coding of Files

The text editor identifies different parts of an AutoLISP program and assigns distinct colors to them. This allows you to find program components easily such as function calls and variable names, and helps you find typographical errors.

Formatting of Text

The text editor can format AutoLISP code for you, making the code easier to read. You can choose from a number of different formatting styles.

Parenthesis Matching

AutoLISP code contains many parentheses, and the editor helps you detect missing parentheses by finding the close parenthesis that goes with an open parenthesis.

Execution of AutoLISP Expressions

You can test expressions and lines of code without leaving the text editor.

Multiple File Searching

The text editor can search for a word or expression in several files with a single command.

Syntax Checking of AutoLISP Code

The text editor can evaluate AutoLISP code and highlight syntax errors.

Details on using the VLISP text editor begin with About the Text Editor (AutoLISP).

To view a LISP program in the VLISP text editor

  1. From the VLISP menu, click File Open File.
  2. In the Open File dialog box, select the Sample\VisualLISP folder, which is in your AutoCAD installation directory.
  3. Double-click the drawline.lsp file.

    VLISP opens the file in a new window—the text editor window—and displays the name of the file in the status bar. If you make a change to the text in the editor window, or add new text, VLISP places an asterisk (*) next to the file name in the status bar. The asterisk remains next to that file name until you either save your changes or close the file.

    You can work on more than one file at a time. Each time you open a file, VLISP displays the file in a new text editor window.