- (defun c:tt (/ a b d e i p pp pt s)
- (if (and (setq e (car (entsel "\n选白线:")))
- (setq s (ssget '((0 . "POINT"))))
- (setq i -1)
- )
- (while (setq a (ssname s (setq i (1+ i))))
- (setq p (cdr (assoc 10 (entget a))))
- (setq pt (vlax-curve-getClosestPointTo e p t))
- (setq d (* 3. (distance p pt)))
- (setq pp
- (list (polar p (* pi 1.25 ) d)
- (polar p (* pi 1.75 ) d)
- (polar p (* pi 0.25 ) d)
- (polar p (* pi 0.75 ) d)
- (polar p (* pi 1.25 ) d)
- )
- )
- (if (setq b (ssget "CP" pp '((0 . "LWPOLYLINE")(90 . 3)(8 . "图层3"))))
- (command "MOVE" b "" "non" p "non" pt)
- )
- (command "MOVE" a "" "non" p "non" pt)
- )
- )
- )
|