- ;; 需要e派工具箱(XCAD)的支持:http://yunpan.cn/QXQKsW9gAPmpF
- ;; 生成平行于线的文字
- (defun c:test1439 ()
- (xyp-CMDLAsc0)
- (xyp-initSet '(dist) '(500.))
- (setq dist (Udist 7 "" "双线最大间距<输入或鼠标直接量取>" dist nil))
- (while (and (setq e1 (entsel "\n选择直线: "))
- (xyp-etype s1 "line")
- )
- (setq s1 (car e1)
- p1 (osnap (cadr e1) "nea")
- rad (xyp-get "angle" s1)
- dd (* xyp-sc 250)
- p2 (if (setq lst (xyp-get-ClosestDistEname s1 p1 dist))
- (polar p1 (angle (nth 2 lst) p1) dd)
- (xyp-Get-RightPoint (polar p1 rad 1) (polar p1 rad -1) dd)
- )
- s2 (xyp-Text 5 p2 "123")
- s2 (xyp-SubUpd s2 50 (xyp-Rad2Real rad 1))
- )
- )
- (xyp-CMDLA1)
- )
|