I do not know if I did something awhile ago to get this not work... (I am good at that). But I am having some rounding issues. The routine is suppose to override the dim text from <> to (X SPACES @ X' = <>').
For example if the dim is 63'. The label now shows it to be 6 Spaces @ 9'. 6x9=54.
But in the same drawing on a different dimension. The dim is 162'. The Label shows 18 Spaces @ 9' = 162'. Which is right.
The Routine is within a macro.
^C^C-dimstyle;V;L80;DIMZIN;8;-dimstyle;apply;all;;(load "SPCT");SPCT;
Any ideas?
(defun C:SPCT
(/ ename obj dim div total fract)
(setq ename (car (entsel "\nSelect dimension: ")))
(setq obj (vlax-ename->vla-object ename))
(setq dim (vla-get-measurement obj))
(if (not def)
(setq def 1))
(setq div (getdist (strcat "\nDivide into <" (rtos def) ">: ")))
(if (not div)
(setq div def)
(setq def div))
(setq total (/ dim div))
(setq fract (- total (fix total)))
(vla-put-textoverride
obj
(strcat (itoa (fix total))
" SPACES @ "
(rtos div)
"'"
" = <>"
))
(princ))
Thanks for the help!