求一个文本合拼代码
合拼后为多行文字,字体与大小不变, 最好单行文字与多行文字有效。 感激。
(defun c:tt5 (/ ent1 ent2)
(setq ent1 (car (entsel "\n选择文字1:")) ent2 (car (entsel "\n选择文字2:")))
(entmod (subst (cons 1 (strcat (cdr (assoc 1 (entget ent1))) "-" (cdr (assoc 1 (entget ent2))))) (assoc 1 (entget ent1)) (entget ent1)))
(entdel ent2)
(princ)
)
本帖最后由 xj6019 于 2020-2-29 09:10 编辑
挨个试试吧,我只是个代码搬运工
这个不难的吧 不清楚是打算手动选择要合并的几个文本还是全图自动识别,合并选中的文本简单,自动识别主要麻烦在于识别的规则 xj6019 发表于 2020-2-28 09:03
挨个试试吧,我只是个代码搬运工
不支持多行文字 本帖最后由 wgij007 于 2020-2-29 07:47 编辑
start4444 发表于 2020-2-28 11:34
(defun c:tt5 (/ ent1 ent2)
(setq ent1 (car (entsel "\n选择文字1:")) ent2 (car (entsel "\n选择文字2: ...
这个基本上可以了。有框选最好了
页:
[1]