Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So I found a lisp that controls the decimal places of numeric values that are given as text objects.
The lisp works in certain drawings but not all. The "problematic" drawings show the objects as "text" -objects and the lisp runs smoothly until end without errors.
Does anybody know if there is something in the code that is version specific or something that could explain the seemingly unreliable behavior.
(defun c:R2D2 (/ ss)
(if (setq ss (ssget "_:L" '((0 . "TEXT"))))
((lambda (i / e l)
(while (setq e (ssname ss (setq i (1+ i))))
(setq l (entget e))
(entmod (subst (cons 1 (rtos (atof (cdr (assoc 1 l))) (getvar 'lunits) 2)) (assoc 1 l) l))
)
)
-1
)
)
(princ)
)
https://www.cadtutor.net/forum/topic/23234-lisp-routine-that-will-round-decimal-places/
Solved! Go to Solution.