Hi,
Try this.
I use variations of it in all the Menufile.MNL files I create and call it
from all functions.
(defun CADAppsCleanCommandLine (spFunctionString)
(setq n (strlen spFunctionString))
(repeat n (princ (chr 8))) (repeat n (princ (chr 32)))
(princ)
)
Typical function:
(defun C:SelectRoad ()
(setq pbProgName (strcat spbARDRoadProgram "SelectRoad"))
(vl-vbarun pbProgName)
(CADAppsCleanCommandLine pbProgName)
) ; end Defun SelectRoad
--
Laurie Comerford
CADApps
www.cadapps.com.au
"Anne Brown" wrote in message
news:40EB046C.CFD2BBDA@autodesk.com...
> These two posts are in answer to "Clean command interface from
> VBA" but attached to a different thread. Copying them here for
> clarity.
> --
> ---
> Anne Brown
> Discussion Groups Administrator
> Autodesk, Inc.
>
> =================
>
> Subject:
> Re: System variables - VBA
> Date:
> Tue, 6 Jul 2004 10:31:44 -0700
> From:
> "Ed Jobe"
> Newsgroups:
> autodesk.autocad.customization.vba
>
>
> 
> Starting with 2000, you can't control the contents of the text
> window. It saves the last 400 lines. You can only control whether
> the content
> is saved to a *.log file. You can clean the current prompt by
> sending another promt line to the command line, thus forcing the
> one you
> don't like further back in the command history. Here's a function
> I wrote to handle sending prompts
>
> Sub CommandLine(msg As String)
> ThisDrawing.Utility.Prompt (msg & vbCrLf & "Command: ")
> End Sub
>
> To clear the last prompt, use:
> CommandLine ""
>
> ***
> Subject:
> Re: System variables - VBA
> Date:
> Tue, 6 Jul 2004 13:14:56 -0500
> From:
> "MP"
> Newsgroups:
> autodesk.autocad.customization.vba
>
> 
> what about
> (defun CmdHistLines( / numlines i)
> (setq numlines(Getint"\nNumber of lines"))
> (setq i 0)
> (setenv"CmdHistLines"(itoa numlines))
>
> ;to test
> (repeat(atoi(Getenv"CmdHistLines"))
> (print(setq i(1+ i))))
> )
> 4000 used to be the upper limit
> now(a2k5) 2048 seems to be the max
>
> "Ed Jobe" wrote in message
> news:40eae200$1_1@newsprd01...
> Starting with 2000, you can't control (snip)
>
> diAb0Lo wrote:
> >
> > send me both ways... I will be glad to you