在citykunan黑侠的基础上改了一下,楼主拿去试一下。- (defun c:tt (/ poi cenx ceny startpoint endpoint)
- (setq x nil)
- (while (setq poi (getpoint "\nPlease pick point:"))
- (setq cenx (car poi))
- (setq ceny (cadr poi))
- (if (and (/= x nil) (< (abs (- cenx x)) 4300))
- (setq cenx (* (/ (abs (- cenx x)) (- cenx x)) 4300))
- )
- (setq x cenx)
- (setq startpoint (list (- cenx 1400) (- ceny 700)))
- (setq endpoint (list (+ cenx 1400) (+ ceny 700)))
- (command "_rectang" startpoint endpoint)
- )
- )
|