;自身乘一个倍数(DEFUN C:zc1() (setvar "cmdecho" 0) (PRINT "(Copyright- aningtang)") (SETQ s0 (GETREAL "请输入乘数:")) (PRINT "PLEASE SELECT THE object") (SETQ S (SSGET )) (SETQ N (SSLENGTH S)) (SETQ M 0)
(DEFUN C:zc1()
(setvar "cmdecho" 0)
(PRINT "(Copyright- aningtang)")
(SETQ s0 (GETREAL "请输入乘数:"))
(PRINT "PLEASE SELECT THE object")
(SETQ S (SSGET ))
(SETQ N (SSLENGTH S))
(SETQ M 0)
(REPEAT N
(SETQ SN (SSNAME S M))
(SETQ e (ENTGET SN))
(IF (= (cdr (assoc 0 e)) "TEXT")
(PROGN
(setq oldr (assoc 1 e))
(setq old0 (cdr oldr))
(setq newr (rtos (* (atof old0) s0) 2 1))
(setq e1 (subst (cons (car (assoc 1 e)) newr) (assoc 1 e) e))
(entmod e1)
)
)
(SETQ M (+ M 1))
)
)
;自身除一个倍数
(DEFUN C:zc2()
(setvar "cmdecho" 0)
(PRINT "(Copyright- aningtang)")
(SETQ s0 (GETREAL "请输入被除数:"))
(PRINT "PLEASE SELECT THE object")
(SETQ S (SSGET ))
(SETQ N (SSLENGTH S))
(SETQ M 0)
(REPEAT N
(SETQ SN (SSNAME S M))
(SETQ e (ENTGET SN))
(IF (= (cdr (assoc 0 e)) "TEXT")
(PROGN
(setq oldr (assoc 1 e))
(setq old0 (cdr oldr))
(setq newr (rtos (/ (atof old0) s0) 2 1))
(setq e1 (subst (cons (car (assoc 1 e)) newr) (assoc 1 e) e))
(entmod e1)
)
)
(SETQ M (+ M 1))
)
)
;自身加一个数
(DEFUN C:zj1()
(setvar "cmdecho" 0)
(PRINT "(Copyright- aningtang)")
(SETQ s0 (GETREAL "请输入增加的数值:"))
(PRINT "PLEASE SELECT THE object")
(SETQ S (SSGET ))
(SETQ N (SSLENGTH S))
(SETQ M 0)
(REPEAT N
(SETQ SN (SSNAME S M))
(SETQ e (ENTGET SN))
(IF (= (cdr (assoc 0 e)) "TEXT")
(PROGN
(setq oldr (assoc 1 e))
(setq old0 (cdr oldr))
(setq newr (rtos (+ (atof old0) s0) 2 1))
(setq e1 (subst (cons (car (assoc 1 e)) newr) (assoc 1 e) e))
(entmod e1)
)
)
(SETQ M (+ M 1))
)
)
;自身减一个数
(DEFUN C:zj2()
(setvar "cmdecho" 0)
(PRINT "(Copyright- aningtang)")
(SETQ s0 (GETREAL "请输入减少的数值:"))
(PRINT "PLEASE SELECT THE object")
(SETQ S (SSGET ))
(SETQ N (SSLENGTH S))
(SETQ M 0)
(REPEAT N
(SETQ SN (SSNAME S M))
(SETQ e (ENTGET SN))
(IF (= (cdr (assoc 0 e)) "TEXT")
(PROGN
(setq oldr (assoc 1 e))
(setq old0 (cdr oldr))
(setq newr (rtos (- (atof old0) s0) 2 1))
(setq e1 (subst (cons (car (assoc 1 e)) newr) (assoc 1 e) e))
(entmod e1)
)
)
(SETQ M (+ M 1))
)
)
[ 本帖最后由 erjijiegou2 于 2010-10-21 22:00 编辑 ]