The attached code inserts a block called c:/zone. Then, it is supposed to ask user if I want to add c:/zone2, if yes, add and prompt for another c:/zone - until I say no - then it should end. I am missing something in the part where it prompts me for zone2. It stops clean after inserting zone. Anyone see the problem? Feel free to add any additional suggestions. ; Define the function (the program). (defun c:zn ( / OLDCE OLDERR OLDTE) ; Save the current value of cmdecho then redefine it. (setq OLDCE (getvar "cmdecho")) (setvar "cmdecho" 1) ; Save the current value of texteval then set it to 1 (setq OLDTE (getvar "texteval")) (setvar "texteval" 1) ; Save the current value of the error handling subroutine then redefine it. (setq OLDERR *error*) (defun *error* (errmes) (princ (strcat " Execution of ADD halted by the following error: " ERRMES)) (setvar "cmdecho" OLDCE) (setq *error* OLDERR) (prin1) ) ;(setq *error* nil) ; NOTE: to turn error handling off, erase the semicolon in the line above. ; Input to AutoCAD's command line. (command "layer" "s" "b1" "" ) (command "insert" "C:/zone" PAUSE "1" "1" "0") );progn (command "osnap" "none" "osnap" "end" ) );;;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ;;; Additional zone for the same sheet ;;; ;;; Prompt for Additional zone for this sheet (initget "Yes No") (setq plugloc (getkword " Do you want an additional zone for this sheet [Y/N] <Yes>: ")) (if (/= plugloc "No") (progn (command "insert" "C:/zone2" PAUSE "1" "1" "0") );progn ) ;;; End of plug/receptacle additions to right side of equipment ;;; ;;; ;;; ;;; End of Additional zone for this sheet (command "osnap" "none") ; Reset "cmdecho" to previous value. (setvar "cmdecho" OLDCE) ; Reset "texteval" to previous value. (setvar "texteval" OLDTE) ; Reset *error* to previous definition. (setq *error* OLDERR) ; Exit quietly (no return value.) (prin1) )