求助大佬以下代码怎么改能实现也可以刷属性块?
;;;以下代码的效果可不可以也能刷属性块?;;;代码为本论坛收集,如有冒犯,请多关照
(defun c:tt2 ()
(if (and (setq s0 (entsel "\n选择首字串 :"))
(setq ent1 (entget(car s0)))
(= (cdr(assoc 0 ent1)) "TEXT")) (progn
(setq tx1 (cdr(assoc 1 ent1))
txt1 (substr tx1 (strlen tx1) 1))
(while (and (setq s1 (entsel "\n选择字串 :"))
(setq ent (entget(car s1)))
(= (cdr(assoc 0 ent)) "TEXT"))
(cond
((= txt1 "Z") (setq txt1 "a"))
((= txt1 "z") (setq txt1 "A"))
(T (setq txt1 (chr (1+ (ascii txt1)))))
)
(setq txt (cdr(assoc 1 ent))
txt (strcat (substr txt 1 (1- (strlen txt))) txt1)
ent (subst (cons 1 txt) (assoc 1 ent) ent))
(entmod ent)
)
))
(princ)
)
逻辑完全不一样的 需要知道属性块中的标记名称
页:
[1]