 - (defun c:nnnn ( / sset ct ed temp value)
- (princ "\nDecrease the value of selected text, Version 1.0, (c) 1999 by Z.L.Wang")
- (prompt "\nSelect text to change: ")
- (if (and (setq sset (ssget '((0 . "TEXT"))))
- (setq value (getreal "请输入增量: "))) (progn
- (setq ct 0)
- (repeat (sslength sset)
- (setq ed (entget (ssname sset ct)))
- (setq temp (atof (cdr (assoc 1 ed))))
- (setq temp (strcat (rtos (+ temp value) 2 3) "m"))
- (entmod (subst (cons 1 temp) (assoc 1 ed) ed))
- (setq ct (1+ ct))
- )
- )
- (princ "\nNothing selected.")
- )
- )
|