I need help on a little AutoLisp routine that I am writing I want to : 1) Save the users layer in a variable called SAVELAYER 2) Change the layer to a layer called "GREEN" 2) Call up the Doughnut command 3) Then, after the user is finishd with the doughnut command, reset the layer to the layer called SAVELAYER
Here is my code:
(defun C:insertdot ( / SAVELAYER ) (setq SAVELAYER (getvar "CLAYER" ) ) (command ".layer" "S" "GREEN" "" ) (command ".donut" 0 0.75 ) (command ".layer" "S" SAVELAYER "" ) ) ; end defun inserdot
The problem is that when the doughnut command is called up, my program does not wait for the doughnut command to run untill the user hits the escape key. The program tries to run on through to the (command ".layer" "S" SAVELAYER ) line and I get an error.
Anybody know how to get my program to wait until the doughnut command runs before the rest of the code runs?
Thanks Jarv (I also have this problem in a routine I tried to write where I call up the "adcenter" function )