yansu 发表于 2011-4-22 07:58:59

求助属性块点选编号问题

求助属性块点选编号问题,块内有多个属性,能否点击某个属性即可数字部分加1(属性有字母前缀)。谢谢

xyp1964 发表于 2011-4-22 08:20:57

;; 需要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)
)

yansu 发表于 2011-4-22 12:59:30

谢谢,我下了e工具箱,连同tt文件一起加载了,运行tt按提示选择了图块,回车后退出了。现将图块文件上传,请帮忙看看。

xyp1964 发表于 2011-4-22 14:46:51

(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)
)


yansu 发表于 2011-4-22 15:27:53

十分感谢。
页: [1]
查看完整版本: 求助属性块点选编号问题