(DEFUN c:tt (/ E_L GRR PT1 PT2 PT3 PT4) (setvar "cmdecho" 0) (COMMAND ".UCS" "n" "v") (SETQ PT1 (GETPOINT "\n左下角点 :")) (while (and (setq GRR (grread 7)) (not (member GRR '((2 32) (2 13) (11 0)))) ;_回车 空格 右键 退出 (/= (car GRR) 3) ;_左键退出 ) (if (= (type (cadr GRR)) 'list) (progn (princ "\n右上角点 :") (setq PT3 (cadr GRR) PT2 (LIST (CAR PT1) (CADR PT3)) PT4 (LIST (CAR PT3) (CADR PT1)) ) (if e_l (entdel e_l) ) (command "._SOLID" "_none" Pt1 "_none" Pt4 "_none" Pt2 "_none" Pt3 "") (setq e_l (entlast)) ) ) ) (COMMAND ".UCS" "p") (PRINC) ) |