Opinion:
No matter what kind of program, CAD command is the most!But while running the command, but also cumbersome press Enter,
What will be a lot of mess, annoying .........
Request:
Want to know how to repeat the CAD commands , can you leave a message, or help, thank you! ! !
If you don't press the space, the command will automatically jump in the back after the implementation,
But when pressing the space it will automatically exit !
Who can do this for me,thanks a lot!
(setq *g-var* nil)
(defun userselect (/ string1 string2 num n showstr char TextList)
(setq string1 "\n asign next action:[action1(A)/action2(B)/action3(C)]action1(A):"
string2 "\n asign next action:[action1(A)/action2(B)/action3(C)]action2(B):"
)
(setq num 0)
(while (< num 4)
(if *g-var*
(setq n *g-var*)
(setq n 1)
)
(cond
((= n 1) (setq showstr string1))
((= n 2) (setq showstr string2))
)
(setq char (getstring showstr)
TextList (list (cons "A" 1)
(cons "a" 1)
(cons "" n)
(cons "B" 2)
(cons "b" 2)
(cons "C" 4)
(cons "c" 4)
)
)
(if (assoc char TextList)
(setq num (cdr (assoc char TextList)))
(setq num 3)
)
(if (< num 3)
(setq *g-var* num)
(if (> num 3)
(setq *g-var* 1)
)
)
(cond
((= num 1) func1)
((= num 2) func2)
((= num 3) (princ "\n input valid,please input again."))
((= num 4) (princ))
)
)
)