Hi Scrutch,
Yes, I know about DIMUNIT, is effectless, but even if it would have had some
effect, that expression had no logic, it was like "whatever value it has, is
still good", so why not remove it ?
As for the POLYAREA function, I like the ActiveX alternative even more. And
if you want the comma separator, is not in this function, but in a
previously posted message of this same thread. I didn't reposted it because
it didn't change. To spare you the of searching it, here it is:
[code]
;==============================================================
(defun rtoc (num # / p#)
(setq num (rtos num 2 #) # 1)
(while (and (/= (substr num # 1) ".")(<= # (strlen num)))
(setq # (1+ #))
)
(setq # (1- #) p# #)
(if (= (setq # (rem # 3)) 0)(setq # 3))
(while (< # p#)
(setq num (strcat (substr num 1 #) "," (substr num (1+ #))) # (+ 4 #)
p# (1+ p#) )
)
num
)
;===============================================================
[/code]
Regards,
Constantin
a écrit dans le message de news:
5493468@discussion.autodesk.com...
DIMUNIT:
Type: Integer
Saved in: Drawing
Initial value: 2
Obsolete. Has no effect in AutoCAD 2000 and later releases except to
preserve the integrity of pre-AutoCAD 2000 scripts and AutoLISP routines.
DIMUNIT is replaced by DIMLUNIT and DIMFRAC.
Constantin...Where in the following routine is it generating the comma
separator?
;===========================================
(defun C:POLYAREA (/ area ss n)
(if (setq ss (ssget '((0 . "*POLYLINE"))))
(progn
(setq area 0)
(repeat (setq n (sslength ss))
(command "_.area" "_o" (ssname ss (setq n (1- n))))
(setq area (+ area (getvar "area")))
)
(alert
(strcat
"\n Square Feet = "(rtoc area 3)
"\n Square Yards = "(rtoc (/ area 9.0) 3)
"\n Acres = "(rtoc (/ area 43560.0) 3)
)
)
)
(alert "\nNo polyline(s) selected!")
)
(princ)
)
;===========================================
Nice bit of code...
Scrutch