Recall Lisp routine

Recall Lisp routine

Anonymous
Not applicable
1,416 Views
9 Replies
Message 1 of 10

Recall Lisp routine

Anonymous
Not applicable

Mistake....I typed a "simple" lisp routine in at the command prompt.

 

Is there anyway to "recall" that routine,  like using ! to recall a variable?

 

Thanks!

0 Likes
Accepted solutions (1)
1,417 Views
9 Replies
Replies (9)
Message 2 of 10

cadffm
Consultant
Consultant
I dont know the difference of simples and non simple routines, but:

You can get your last inputs by using the arrow keys in acad (up and down) for example.

Tip: Set inputhistorymode to 14

Sebastian

0 Likes
Message 3 of 10

Anonymous
Not applicable
Knew that, but this is way down the history tree.

I was thinking there was a way to list...
0 Likes
Message 4 of 10

john.uhden
Mentor
Mentor

If you have LOGFILEMODE turned on then everything that was on your text screen was written to a file in your LOGFILEPATH.  Otherwise, if you can't scroll back up to it, it's gone except whatever may be left in your memory (in your head, silly).

John F. Uhden

0 Likes
Message 5 of 10

ВeekeeCZ
Consultant
Consultant

There is a list of the last 20 commands under RT shortcut menu.

 

image.png

 

HERE is about InputHistoryMode setting. All options are on by default.

0 Likes
Message 6 of 10

Ranjit_Singh
Advisor
Advisor

@Anonymous wrote:

.............

 Is there anyway to "recall" that routine,  like using ! to recall a variable?

Thanks!


If you defined the function as  a quoted function you can recall it's contents as a list structure using !functionname. However, this isn't possible with the defun function.

Only opton is to use see contents of the logfile (if logfile mode was on while you typed the routine).

0 Likes
Message 7 of 10

john.uhden
Mentor
Mentor
Accepted solution

I really feel for you and your loss.  I think that all of us have learned at least one thing in life the hard way.

In the future, it will help if you do all your coding in an editor and then paste into the command line.

Personally, I keep LOGFILEMODE turned on.  Yes, it creates a lot of bytes of mostly useless .LOG files, but I have a startup routine in my acaddoc.lsp file (or somewhere) that finds them all and gives you the chance to delete all those that are more than 30 days old.

 

I'll dig it out for you if you would like.

John F. Uhden

0 Likes
Message 8 of 10

Anonymous
Not applicable
Your right I usually open an editor, but this one was so short....
It's really not a big deal with this particular one. It just set of a memory that I thought I saw a way to do it....
Long, long ago in a galaxy far, far away...

0 Likes
Message 9 of 10

Anonymous
Not applicable

F2 and scroll back up ? I use this a lot when I make a simple typo when testing lisps.

0 Likes
Message 10 of 10

DannyNL
Advisor
Advisor

@Anonymous wrote:

F2 and scroll back up ? I use this a lot when I make a simple typo when testing lisps.


The text screen history buffer is limited and by default only hold 400 lines and anything above is discarded and can not be recovered.

 

To change the number of lines of the history buffer for the text window the following code can be used, where [VALUE] is between 25-2048.

 

(vl-catch-all-apply 'vla-put-HistoryLines (list (vla-get-Display (vla-get-Preferences (vlax-get-acad-object))) [VALUE]))
0 Likes