Using the Console Window History

AutoCAD AutoLISP & Visual LISP

 
Using the Console Window History
 
 
 

You can retrieve text you previously entered in the Console window by pressing TAB while at the Console prompt. Each time you press TAB, the previously entered text replaces the text at the Console prompt. You can repeatedly press TAB until you cycle through all the text entered at the Console prompt during your VLISP session. After you've scrolled to the first entered line, VLISP starts again by retrieving the last command entered in the Console window, and the cycle repeats. Press SHIFT + TAB to scroll the input history in the opposite direction.

For example, assume you entered the following commands at the Console prompt:

(setq origin (getpoint "\nOrigin of inyn sign: "))
(setq radius (getdist "\nRadius of inyn sign: " origin))
(setq half-r (/ radius 2))
(setq origin-x (car origin))
(command "_.CIRCLE" origin radius)

To retrieve commands entered in the Console window

  1. Press TAB once. VLISP retrieves the last command entered and places it at the Console prompt:
    _$ (command "_.CIRCLE" origin radius)
  2. Press TAB again. The following command displays at the Console prompt:
    _$  (setq origin-x (car origin))
  3. Press TAB again. VLISP displays the following command:
    _$  (setq half-r (/ radius 2))
  4. Now press SHIFT + TAB. VLISP reverses direction and retrieves the command you entered after the previous command:
    _$ (setq origin-x (car origin))
  5. Press SHIFT + TAB again. VLISP displays the following command:
    _$ (command "_.CIRCLE" origin radius)

    This was the last command you entered at the Console prompt.

  6. Press SHIFT + TAB again. Because the previous command retrieved was the last command you entered during this VLISP session, VLISP starts again by retrieving the first command you entered in the Console window:
    _$ (setq origin (getpoint "\nOrigin of inyn sign: "))

    Note that if you enter the same expression more than once, it appears only once as you cycle through the Console window input history.

    You can perform an associative search in the input history to retrieve a specific command that you previously entered.

To perform an associative search of the Console input history

  1. Enter the text you want to locate. For example, enter (command at the Console prompt:
    _$ (command
  2. Press TAB. VLISP searches for the last text you entered that began with (command:
    _$ (command "_.CIRCLE" origin radius)

    If VLISP does not find a match, it does nothing (except possibly emit a beep). Press SHIFT + TAB to reverse the direction of the associative search and find progressively less-recent inputs.