Display last input data - like
Hi, I am trying to write a program in LISP where the user inputs some data (for instance a window frame thickness), then the next time the command is invoked, the last input for the window thickness is shown, so that when the user presses enter the last input is automatically applied.What I want is exactly how the Offset command works. It remembers your last input.
How do I write this code to remember the last input?
I have got the following code below to work with the first argument (TopOffset), but the second argument (BottomOffset) makes the program not work
(if (= TopOffsetV null)(setq TopOffsetV "35"))(setq TopOffset (getstring (strcat "\nEnter Top Caulk Offset I worked out the problem. I simply changed
null to
nil and that worked. So simple. To test null, try
(if (null TopOffsetV)(setq TopOffsetV "35"))
Henrique I originally had the code that way around but it just didn't work at all when the code was as you have written. I don't know why, thats why I tried the
(= TopOffsetV null)
That worked for the first argument, but not for any after it. So I tried nil and it worked. I had 4 arguments in a row with the same IF arguments Andrew,
the
(= TopOffsetV null)Will return always nil
The
(null TopOffsetV)will return T if null otherwise nil
Henrique
页:
[1]