Binky,
I fixed the code above so copy it again, thanks.
Added (vl-load-com), I have this in my ACADdoc.lsp so I sometimes forget to add it to sample code
fixed the repeat problem, added True to the end of the condition
As for the
OR, here is an excerpt from this thread:
http://www.theswamp.org/index.php?topic=13046.msg158557#msg158557The
OR will process each line as long as they are
false, it will quit when
true is returned
(or (a. is true) ; stop here
(b. does not get this far)
)
(or (a. is false) ; keep going
(b. do this & if false keep going)
(c. do this if b was false)
)
So this will work as well with a variable with a
value or
nil(setq var "Some Text")
(or var ; Stop here if the var has a value, if nil then keep going
(setq var "Some Text")
)
You can use
IF or
OR in the situation but I prefer
OR as the VLIDE format keeps it in one line.
This is just a personal preference.
Read the thread, link posted, about
WHILE and
COND.
If you still have questions I'll be glad to try and answer them.