actually, the trick would be to finish the code in pline command as AAD guessed. The reason you'd have the problem in the first place is the fact that you're passing control to the user and not taking it back. There are a few threads based on continuing the pline generation so control is passed back to the computer after the user finishes, thus allowing setvar or the next command to do its job.