文本内容和字高匹配复制
- ;; 文本内容和字高匹配复制
- ;; 伪源码需要e派工具箱(XCAD)的支持
- (defun c:tt ()
- (CMDLA0)
- (if (and (setq s0 (car (entsel "\n选择标准文本: ")))
- (xyp-etype s0 "text")
- (setq ss0 (ssget))
- )
- (progn
- (setq tx (xyp-get-dxf 1 s0)
- th0 (xyp-get-dxf 40 s0)
- ss1 (ssget "X" (list '(0 . "text") (cons 1 tx)))
- p0 (xyp-get-9pt ss0 9)
- i -1
- )
- (while (setq s1 (ssname ss1 (setq i (1+ i))))
- (setq pt (xyp-get-9pt s1 3)
- th (xyp-get-dxf 40 s1)
- s0 (entlast)
- sc (/ th th0 1.)
- pt (xyp-get-Pt2Y pt (* sc -200))
- )
- (xyp-copymove ss0 p0 pt)
- (if (/= sc 1)
- (xyp-ScaleEntity (xyp-SSelEntnext s0) pt sc)
- )
- )
- )
- )
- (CMDLA1)
- )
|