All pastes #558907 Raw Edit

Doc

public text v1 · immutable
·published 2007-06-11 15:28 UTC
rendered paste body
(setq blk2sel(getstring T "Name of block to renumber?"))
(setq valfrom(getstring "Difference [+]:"))
(setq rnsel (ssget "x" (list (cons 0 "INSERT") (cons 2 blk2sel))))
(setq blkinc 0)
(setq blkcnt (1-(sslength rnsel)))
(while (<= blkinc blkcnt)
	(setq curatti (entget(entnext(ssname rnsel blkinc))))
	(setq curattv (cdr(assoc 1 curatti)))
	(setq newval (rtos(+ (atoi valfrom) (atoi curattv)) 2 0))
	(entmod (subst (cons 1 newval) (assoc 1 curatti) curatti))
	(1+ blkinc)
)