
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can anyone plase make this work in AutoCAD Map3D 2015 release?
It has worked fine in all previous versions of AutoCAD Map3D (prior to 2015).
;;This program will calculate the area of irregular polygons
;;by picking an area inside the polygon.
(defun C:AUTOAREA (/ ar en n num pt ss1)
(if (not "acadapp.exp")(xload "acadapp.exp"))
(setq n 0)
(setq ss1 (ssadd))
(while (setq pt (getpoint "\nSelect internal point:"))
(bpoly pt) ;;ADS function
(setq ss1 (ssadd (entlast) ss1))
);;while
(setq num (sslength ss1))
(command ".area" "a" "e")
(while (/= num n)
(setq en (ssname ss1 n))
(command en)
(setq n (1+ n))
);;while
(command "" "")
(command "erase" ss1 "")
(command "redraw")
(princ "\nThe area of the polygon in hectares is: ")
(princ (cvunit (setq ar (getvar "AREA")) "SQ METER" "HECTARE"))
(princ "\nThe area of the polygon in acres is: ")
(princ (cvunit (setq ar (getvar "AREA")) "SQ METER" "ACRE"))
(setq ss nil)
(prin1)
);;end autoarea.lsp
Solved! Go to Solution.