Hi,
What is my goal: to select multiple dimensions entities and obtain the sum os all of them. In the image below i should be albe to select the 2 dimensions and the result of the command/routines should respond me "5".
Someone know a routine/command for that?
Thanks in advance!
Solved! Go to Solution.
Solved by _Tharwat. Go to Solution.
Try ...
(defun c:Test (/ i ss ) (if (setq i 0. ss (ssget '((0 . "*DIMENSION")))) ((lambda (% / sn) (while (setq sn (ssname ss (setq % (1+ %)))) (setq i (+ (vla-get-measurement (vlax-ename->vla-object sn)) i)) )) -1) ) (if (> i 0.) (princ (strcat "\nTotal measuremnts : < " (rtos i 2 4) " > .")) ) (princ) )(vl-load-com)
Hi,
Copy the codes and save them in a txt file with the extension .lsp then READ THIS to know how to load the program.
After you load the codes then just call the command name which is TEST
Good luck.