|
下面是关于的程序
(defun c:hch ()
(setq ss (ssget))
(setq en (ssname ss 0))
(setq lastent (entget en))
(regapp "MY_TAG")
(setq exdata
'((-3
("MY_TAG"
(1000 . "This is a new thing!")
)
)
)
)
(setq newent
(append lastent exdata)
)
(entmod newent)
)
;;;在上面的延伸资料 "This is a new thing!" 好象不能用变量吧
;;;我现在想用 (subst) 函数将它替换掉
;;;比如 (setq tag “定位块,割,单+0.010”)
;;;然后用 tag 将 "This is a new thing!" 替换掉
;;;我的这种想法可以吗
;;;___________________________________________________
(defun c:h_dim ()
(setq tag (entget (car (entsel)) '("MY_TAG")))
(setq tag1 (cdr (cadr (cadr (assoc -3 tag)))))
(setq t_hight (getstring "\n请指定字高"))
(setq p1 (getpoint "\ninsertion point"))
(command "text" p1 t_hight 0 tag1)
(princ)
) |
|