To begin with, I’d recommend the other post on Kean’s blog
Increasing the size of AutoCAD’s command line history
you will know how to increase the size of command line history manually. At API side, there are two ways to access the Text Window buffer size, expressed in numbers of history lines: the
CmdHistLines environment variable, and the AutoCAD.AcadPreferencesDisplay.HistoryLines Automation property.
Here is how to set the environment variable from AutoLISP:
(setenv "CmdHistLines" "2048")
Here is how to set the Automation property from AutoLISP:(vl-load-com)
(vla-put-historylines (vla-get-display (vla-get-preferences
(vlax-get-acad-object))) 2048)