- (defun c:11()
- (vl-load-com)
- (if
- (and
- (setq _pt1(getpoint "\n第一点"))
- (setq _pt2(getpoint _pt1 "\n第二点"))
- )
- (progn
- (setq _mspace (vla-get-modelspace (vla-get-activedocument(vlax-get-acad-object))))
- (setq _pt3 (list (car _pt2) (cadr _pt1)))
- (setq _pt4 (list (* 0.5 (+ (car _pt1)(car _pt2))) (cadr _pt1)))
- (vla-addline _mspace (vlax-3d-point _pt1) (vlax-3d-point _pt3))
- (vla-addline _mspace (vlax-3d-point _pt3) (vlax-3d-point _pt2))
- (setq _pt5 (polar _pt4 (* 0.5 pi) 10))
- (setq _myxline (vla-addXline _mspace (vlax-3d-point _pt5)(vlax-3d-point _pt4)))
- )
- )
- (princ)
- )
|