本帖最后由 xyp1964 于 2022-2-3 21:53 编辑
- ;; 下划线 ;; (xhx (setq s1(car(entsel"\n选择: "))) 100 60)
- ;; (xhx ename文本实体 dd字线距离 ww线宽)
- (defun xhx (ename dd ww / p1 p2 p9 ptn)
- (defun 9pt19 (ent / p1 p9)
- (vla-getboundingbox (vlax-ename->vla-object ent) 'p1 'p9)
- (mapcar 'vlax-safearray->list (list p1 p9))
- )
- (setq ptn (9pt19 ename)
- p1 (car ptn)
- p9 (cadr ptn)
- p2 (list (car p9) (cadr p1))
- p1 (polar p1 (* pi 1.5) dd)
- p2 (polar p2 (* pi 1.5) dd)
- )
- (command "pline" "non" p1 "w" ww ww "non" p2 "")
- (entlast)
- )
|