I'm a little pressed for time today, and I haven't coded in a while. I can't remember how to loop this (also, if something better than using (command) will work, I'll take that too!):
Background: Select object, if no object selected, try again, bring selected object to front, repeat until user escapes.
(defun c:DF ()
;; next loop until user presses enter or select object
(while (and (null (setq en (entsel "\nSelect object to Bring to FRONT...")))
(= (getvar "errno") 7)
)
(prompt "\nMissed, Try again or Enter to exit.")
) ; end while
(command "draworder" en "" "front")
);end defun
Thanks in advance!