;;;Change a number in (m)any text string(s) by a numeric value and ;;;specify or change precision (decimal places). ;;;(uses UINT.LSP, USTR.LSP) ;;; ;;;Note: Reduced precision cannot be restored to greater precision ;;; except with UNDO immediately after it has been reduced. ;;; ;;; ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 9-19-95 ;;;> EDITED: 08-27-2001 ;;; (DEFUN C:BREAL () ; luprc tele elem tstr cnt_1 cnt_2 pfx_str sfx_str (setq luprc (getvar "luprec")) (setq ndpl (uint 1 "" "Number of decimal places " ndpl)) (setvar "luprec" ndpl) (setq adjv (distof (ustr 1 "\nValue to change number by " (if adjv (rtos adjv) "" ) ;_ end of if nil ) ;_ end of ustr ) ;_ end of distof ) ;_ end of setq (if prevsrch NIL (setq prevsrch '((1 . "*#.###")(1 . "~ELEV=*")(1 . "~*-*")(1 . "~*+*"))) ) ;_ end of if (princ "\nPrevious search pattern: ") (foreach n prevsrch (if (eq (car n) 1) (progn (princ (cdr n)) (princ ", ") ) ;_ end of progn ) ;_ end of if ) ;_ end of foreach (setq srchpatt (list (cons 1 (ustr 1 (strcat "New search pattern for text containing numbers? " (if prevsrch "or