I have a lisp to set a certain layer active, then execute a command, then reset the layer back to what it was beforehand. I am running into trouble where I issue the command (itself a variable), becuase the number of user inputs can vary and I don't know how to make my lisp wait for the user to complete the command before resetting the layer. Pause would only work if I always needed the same number of pauses for every type of command. The way this works is I define the lisp as part of a company mnl file, then modify toolbar properties, such as dimlinear and qleader to call the lisp and use the command as an argment to the lisp.   (defun C:layerkey ( / currentlayer newlayer acadcommand) (setq currentlayer (getvar "clayer")) (setq acadcommand (getstring)) (if (wcmatch acadcommand "*dim*") (setq newlayer "A-Anno-Dims") (setq newlayer "A-Anno-Note") ) (command "-layer" "m" newlayer "c" "42" "" "") (command acadcommand) (setq currentlayer (getvar "clayer")) (princ) )   Any thoughts?