0 Members and 1 Guest are viewing this topic.
(defun c:test ( / lt ) (while (cond ((initget "Line Pline Exit")) ((not (member (setq lt (getkword "\nLine or Pline? [Line/Polyline/Exit] <Exit>: "))'("Line" "Pline" "Exit"))) nil) (t (command (strcat "_." lt)) (while (= 1 (logand 1 (getvar 'cmdactive))) (command pause) ) t) ) ) (princ) )
(= "Exit" ...
(member (...) '("Exit" nil))
Quote from: Lee Mac on August 31, 2012, 08:14:33 AMEDIT: Oops! I didn't read all the posts - it seems the OP now wants the 'Exit' to be default...No he wants LINE to be the default until he wants to exit and then he wants EXIT to be the default.
EDIT: Oops! I didn't read all the posts - it seems the OP now wants the 'Exit' to be default...
Quote from: RenderMan on August 31, 2012, 07:44:29 AM Yeah!!! I know! Funny as hell! :pissed: Anyhow, I hope I didn't confuse you too much RM .
Actually I'm with him on this: The best interface is no interface.Unless they can get some decent brainwave translator going I don't think it's possible though!
Not at all, my friend... Just ribbing you; Happy Friday!
(defun c:test (/ lt) ;; Edited from Alan's code (while (cond ((initget "Line Pline ")) ((member (setq lt (getpoint "\nLine or Pline? [Line/Polyline] <Select Point For Line / exit>: ")) '("Line" "Pline")) (command (strcat "_." lt)) (while (= 1 (logand 1 (getvar 'cmdactive))) (command pause) ) t ) ((vl-consp lt);_Select point , run default command "LINE" (command "_.Line") (command lt) (while (= 1 (logand 1 (getvar 'cmdactive))) (command pause) ) t) ) ) (princ) )