You could just incorporate the pause function:
- (defun c:TEST () (command "._line" pause pause "") (princ))
... But this may cause undesired behavior following a right click being entered in lieu of a point specification. This adaptation is a bit less prone to this undesired behavior:
- (defun c:TEST () (command "._line") (princ))
... If the requirement is to use two variables, then consider using local in lieu of global variables, and avoid potential errors in the Command call by using an If statement:
- (defun c:TEST (/ point1 point2) (if (and (setq point1 (getpoint "\nSpecify start point: ")) (not (initget 32)) (setq point2 (getpoint point1 "\nSpecify end point: ")) ) (command "._line" point1 point2 "") (prompt "\n** Invalid point ** ") ) (princ))
|