sergiu_ciuhnenco Posted May 13, 2021 Posted May 13, 2021 Test1.dwg Need help with checking the multiplying of numbers is equal with the dimension Quote
ronjonp Posted May 13, 2021 Posted May 13, 2021 Not color coded but you can check the math visually: (defun c:foo (/ o s) (if (setq s (ssget ":L" '((0 . "dimension")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq o (vlax-ename->vla-object e)) (or (wcmatch (vla-get-textoverride o) "*<>*") (vla-put-textoverride o (strcat (vla-get-textoverride o) "\\P<>")) ) ) ) (princ) ) Quote
sergiu_ciuhnenco Posted May 13, 2021 Author Posted May 13, 2021 Hi Ronjonp !!! to go with your Ideea : just rewrite the dimension with corect number (red number) 14x100=1400 So if we have a dimension 1400 and step x100 => 14x100=1400 Quote
ronjonp Posted May 14, 2021 Posted May 14, 2021 (edited) Like this? (defun c:foo (/ o s) (if (setq s (ssget ":L" '((0 . "dimension")))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq n (/ (vla-get-measurement (setq o (vlax-ename->vla-object e))) 100.)) (vla-put-textoverride o (strcat (rtos n 2 0) "x100")) ) ) (princ) ) Edited May 14, 2021 by ronjonp Quote
sergiu_ciuhnenco Posted May 14, 2021 Author Posted May 14, 2021 Hope you understand te ideea Thnaks in advance !!! Quote
sergiu_ciuhnenco Posted May 14, 2021 Author Posted May 14, 2021 yes, work perfectly for x100 step, Is it possible for to be in one lisp incuded all the steps : 60, 70, 75, 80, 90, 100, 150, 200 Quote
BIGAL Posted May 14, 2021 Posted May 14, 2021 (edited) This is a slight change to what Ronjonp provided. (defun c:foo (/ o s spc) (if (setq s (ssget ":L" '((0 . "dimension")))) (progn (setq spc (getreal "\nEnter spacing eg 100 ")) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq n (/ (vla-get-measurement (setq o (vlax-ename->vla-object e))) spc)) (vla-put-textoverride o (strcat (rtos n 2 0) (strcat "x" (rtos spc 2 0)))) ) ) ) (princ) ) If you have fixed values could do like this can have more values its a library routine. 3 lines of code to make. Edited May 14, 2021 by BIGAL 1 Quote
sergiu_ciuhnenco Posted May 15, 2021 Author Posted May 15, 2021 Thanks BIGAL !!!!! also thanks ronjonp !!!! for yours receptivity !!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.