"nil" echoed in AutoCad 2004

The following lisp routine executes just fine but returns the word
'nil'. Does it mean that there's something wrong somewhere?
(command "layer" "make" (strcat "rev_" (substr (rtos (getvar "cdate")
1 14) 4 12)) "" "" "" "" "")
cmdecho is off (in case that makes any difference)
Reply to
strawberry
Loading thread data ...
Are you running that from a button? There's no (defun) etc. In a routine you'd add a (princ) to the end to silence the return value of the last command, which in your case is 'nil'...It's called 'exiting quietly'. Maybe try appending it to your code.
Reply to
Michael Bulatovich
Thanks Michael.
Although the *.lsp file ends with a (princ), while putting the routine together I test the lines by copy/pasting them from notepad into autocad's command prompt - hence the 'nil' , I guess. Thanks for the clearing that up.
Reply to
strawberry
Take a penny, leave a penny.
Reply to
Michael Bulatovich

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.