I'm trying to get this sub-routine to ask a user to draw a line by picking two points. I don't want the user to have to do anything other than pick two points. They don't even have to hit enter. This works fine, the problem I'm having is repeating it an unlimited amount of times until the user hits ENTER.
I know I can do this setting pt1 and pt2 variables and drawing a line between them, but I like the vanilla "line" command how it previews the line before you pick the 2nd point.
The problem is at the 2nd "while".
Here it is:
Code:(defun polyop () (command "-layer" "m" "Hal_Edge" "") (command "pline") (prompt "\nDraw slab edge at polygonal opening:") (while (= (getvar "cmdactive") 1) (command pause)) (command "-layer" "m" "Hal_Cross" "") (while (prompt "\nDraw crossing line:") (command "line" pause pause "") ) (princ) );defun (princ)