|
Want to repeat a command indefinitely using
AutoLisp? ;;;<--Coding starts here (defun c:test () (prompt "\nSpecify first point: ") (command "_LINE") (while (= 1 (logand (getvar "CMDACTIVE")
1)) (command PAUSE) (prompt "\nSpecify next point: ") );while ;;;Now you can carry on with rest of your
programme (princ) );defun ;;;Coding ends here--> And here's another bit of coding that draws a never ending leader line : ;;;<--Coding starts here (defun c:test1 ( / pt1 pt2 pt3) (setq pt1 (getpoint "\nSpecify first point: ")) (setq pt2 (getpoint "\nSpecify next point: ")) (setq pt3 (polar pt1 (angle pt1 pt2) 3.5)) (command "_PLINE" pt1 "W" "0" 5.0 pt3 "W" "0" "0" pt2) (while (setq pt2 (getpoint "\nTo point: " pt2)) (command pt2) );while (command "") ;;;Now you can carry on with rest of your
programme (princ) );defun ;;;Coding ends here--> |
|