How to Set the Number of Lines in the Command History

When pressing F2 to look at the command line history, is the number of lines shown less than you want to see.

To set a new maximum number of lines Autocad shows in the command history dialog, you will need to send the following lisp expression:

(SETENV “CmdHistLines” “2000”)

The maximum number of lines is 2048 and the minimum is 25.

Note: this lisp exression can be added to your acad.lsp or acaddoc.lsp files so this setting is automatically set when Autocad is first launched, or when a new drawing is opened.

If you would like to see how many lines are being shown you can get the information by sending this lisp expression:

(GETENV “CmdHistLines”)


Since 1996, EnvisionCAD has been a nationally recognized leader in the configuration, customization, implementation, training & support for CAD software solutions. Our individualized approach has benefited private engineering firms and government agencies alike. Basic or advanced, we can help you get the most from your CAD technology.

2 comments on “How to Set the Number of Lines in the Command History

  1. Chris Reply

    If I copy / paste
    (setenv “CMDHISTLINES” “2048”)
    from your web page into my .lsp file, AutoCAD does not like the quote characters you are using.

    If I replace your quotes with quotes from my keyboard, it works fine.
    Hope this helps the next person…

    • Chris Reply

      That helped me! I thought my initial copy/paste looked kind of odd.

      – chris

Leave a Reply

Your email address will not be published. Required fields are marked *