- ;; 需要e派工具箱(XCAD)的支持:[url]http://yunpan.cn/QXQKsW9gAPmpF[/url](defun c:tt ()
- (xyp-CMDLA0)
- (setq i -1)
- (if (setq ss (ssget '((0 . "*text") (8 . "wr_lpj,LGJ1"))))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq p5 (xyp-9pt s1 5)
- rad (+ (xyp-DXF 50 s1) (* pi 0.5))
- p1 (polar p5 rad 1000)
- p2 (polar p5 rad -1000)
- )
- (if (setq ss1 (ssget "f" (list p1 p2) '((0 . "line") (8 . "beam"))))
- (progn
- (setq s2 (xyp-ClosestPtToSslst p5 (xyp-ss2list ss1))
- pt (vlax-curve-getclosestpointto s2 p5)
- pt (polar pt (angle pt p5) 350)
- )
- (xyp-move s1 p5 pt)
- )
- )
- )
- )
- (xyp-CMDLA1)
- )
|