不过你一动这个标注,写的东西就会消失- (defun c:test( / ent hd ld ent ents str)
- (setq ent (car (entsel "\n选择标注...")))
- (setq hd (getstring "\n输入上偏差:"))
- (setq ld (getstring "\n输入下偏差:"))
- (setq ent (tblobjname "block" (cdr (assoc 2 (entget ent)))))
- (while (/= (cdr (assoc 0 (entget (setq ent (entnext ent))))) "MTEXT"))
- (setq ents (entget ent))
- (setq str (cdr (assoc 1 ents)))
- (setq str (strcat str "{\\H0.45x;\\S" hd "^" ld ";}"))
- (setq ents (subst (cons 1 str) (assoc 1 ents) ents))
- (entmod ents)
- (command "_.regen")
- (princ)
- )
|