Initial commit

This commit is contained in:
2018-11-26 22:23:22 +01:00
parent 317403389d
commit 86753f6ca0
50 changed files with 4573 additions and 1 deletions

35
downloaded/Polyarea.lsp Normal file
View File

@@ -0,0 +1,35 @@
;;POLYAREA.LSP
;; Adds the area of one or more closed polylines
;;
(defun C:POLYAREA (/ a ss n du)
(setq a 0
du (getvar "dimunit")
ss (ssget '((0 . "*POLYLINE"))))
(if ss
(progn
(setq n (1- (sslength ss)))
(while (>= n 0)
(command "_.area" "_o" (ssname ss n))
(setq a (+ a (getvar "area"))
n (1- n)))
(alert
(strcat "The total area of the selected\nobject(s) is "
(if (or (= du 3)(= du 4)(= du 6))
;
;The following 2 lines translate the area to square inches and feet
;for users using US engineering or architectural units:
;
(strcat (rtos a 2 2) " square inches,\nor "
(rtos (/ a 144.0) 2 3) " square feet.")
;
;In the following line, change the word "units" to whatever units
;you are using - meters, millimeters, feet, etc.
;
(strcat (rtos (/ a 10000) 2 3) " square meters.")))))
(alert "\nNo Polylines selected!"))
(princ)
)
(alert
(strcat "POLYAREA.LSP"
"\n\n Type POLYAREA to start"))
(princ)