Completing a Word by Matching

AutoCAD AutoLISP & Visual LISP

 
Completing a Word by Matching
 
 
 

Using Complete Word by Match, VLISP completes a partially entered word by matching the part you have typed with another word in the same window. For example, suppose the following shows the history of your VLISP Console window:

_$ (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)

In other words, these are the last five commands that you entered from the Console.

To complete a word by matching

  1. Type the following at the Console prompt:
    _$ (c
  2. Press CTRL + SPACEBAR to invoke Complete Word by Match. VLISP finds the last word you entered that began with the letter “c,” and completes the word you started to type:
    _$ (command
  3. If that is not the word you are looking for, press CTRL + SPCAEBAR again. VLISP searches back through the Console history for the previous occurrence of a word beginning with the letter “c”:
    _$ (car

    VLISP will keep searching for matching words each time you press CTRL + SPACEBAR. If you keep pressing CTRL + SPACEBAR after VLISP finds the last matching word, VLISP repeats the retrieval sequence. (Note that you can also choose Search Complete Word by Match from the VLISP menu instead of pressing CTRL + SPACEBAR to invoke the Match feature.)

    If VLISP does not find any matching words, it does nothing.

    You can use Complete Word by Match in either the Console window or the text editor window. When you invoke the feature from the Console window, VLISP only searches the Console for a match; when invoked from a text editor window, VLISP only searches that editor window for a match.

    The Complete Word by Match feature is not case-sensitive. In the previous example, you would have achieved the same result had you entered a capital C instead of a lowercase c.