Running Selected Lines of Code

AutoCAD AutoLISP & Visual LISP

 
Running Selected Lines of Code
 
 
 

With VLISP, you can select lines of code in the text editor window and run only the selected code, instead of the whole program.

To run selected lines of AutoLISP code in a Visual LISP editor window

  1. Using the drawline.lsp program as an example, highlight the following lines of code:
    (setq pt1(getpoint "\nEnter the start point for the line: ")
          pt2(getpoint pt1 "\nEnter the end point for the line: "))
  2. Choose the Load Selection button on the Run toolbar.

    VLISP immediately runs the code and switches control to AutoCAD to prompt you for input.