- (defun c:bz ()
- (setvar "cmdecho" 0)
- (setq en (entsel "\n 选取尺寸标注"))
- (setq ZONGBIAO (entget (car en)))
- (setq OLDZIBIAO (assoc 42 ZONGBIAO))
- (setq OLDZIBIAOY (cdr OLDZIBIAO))
- (print OLDZIBIAOY)
- (princ "\n")
- (if (not (setq NEWZIBIAOY
- (getreal (strcat "\n 请输入新尺寸:<"
- (vl-princ-to-string OLDZIBIAOy)
- ">"
- )
- )
- )
- )
- (setq NEWZIBIAOY OLDZIBIAOy)
- )
- (if (or (/= OLDZIBIAOY NEWZIBIAOY)
- (/= (vl-princ-to-string NEWZIBIAOY)
- (cdr (assoc 1 (entget (car en))))
- )
- )
- (progn
- (setq ZONGBIAO (subst (cons 1 (vl-princ-to-string NEWZIBIAOY))
- (assoc 1 (entget (car en)))
- (entget (car en))
- )
- )
- (entmod ZONGBIAO)
- )
- )
- (princ)
- )
|