求助属性块点选编号问题
求助属性块点选编号问题,块内有多个属性,能否点击某个属性即可数字部分加1(属性有字母前缀)。谢谢 ;; 需要e派工具箱的支持(defun c:tt ()(setq e1 (nentsel "\n选择: ")
s1 (car e1)
)
(if (= (xyp-get-dxf 0 s1) "ATTRIB")
(if (setq a (distof (xyp-get-dxf 1 s1)))
(xyp-SubUpd s1 1 (rtos (+ a 1)))
)
)
(princ)
) 谢谢,我下了e工具箱,连同tt文件一起加载了,运行tt按提示选择了图块,回车后退出了。现将图块文件上传,请帮忙看看。 (defun c:tt ()
(setq e1 (nentsel "\n选择: ")
s1 (car e1)
)
(if (= (xyp-get-dxf 0 s1) "ATTRIB")
(progn
(setq tx (xyp-get-dxf 1 s1)
lst (xyp-Get-HzEngNum tx 0)
)
(if (setq a (distof (cadr lst)))
(xyp-SubUpd s1 1 (strcat (car lst) (rtos (+ a 1) 2 0)))
)
)
)
(princ)
)
十分感谢。
页:
[1]