- ;;;引线小程序
- (defun c:tt (/ ang entdate entname entype p10 p11 pt1 pt2 pt3)
- (setq entname (car (entsel "\n选择射线:")) entdate (entget entname) p10 (cdr (assoc 10 entdate)) p11 (cdr (assoc 11 entdate)) p11 (list (+ (car p10) (car p11)) (+ (cadr p10) (cadr p11))) ang (angle p10 p11))
- (if (= ang 0)
- (while (setq pt1 (getpoint "\n选择点位:"))
- (setq pt2 (inters pt1 (polar pt1 (+ ang (* 0.5 pi)) 111) p10 p11 nil) pt3 (polar pt2 ang 3))
- (entmake (list '(0 . "LEADER") '(100 . "AcDbEntity") '(100 . "AcDbLeader") (cons 10 pt1) (cons 10 pt2)
- (cons 10 pt3)
- )
- )
- );while
- (while (setq pt1 (getpoint "\n选择点位:"))
- (setq pt2 (inters pt1 (polar pt1 (+ ang (* 0.5 pi)) 111) p10 p11 nil))
- (entmake (list '(0 . "LEADER") '(100 . "AcDbEntity") '(100 . "AcDbLeader") (cons 10 pt1) (cons 10 pt2)
- )
- )
- );while
- );if
|