MK2015 Posted May 14, 2015 Share Posted May 14, 2015 (edited) Can anyone 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 Edited May 19, 2015 by rkmcswain added [CODE] tags Quote Link to comment Share on other sites More sharing options...
BIGAL Posted May 15, 2015 Share Posted May 15, 2015 Like other posts change COMMAND to Command-s or VL-cmdf definately required for 2016 etc Quote Link to comment Share on other sites More sharing options...
MK2015 Posted May 15, 2015 Author Share Posted May 15, 2015 I don't know LISP at all, but I found and replaced "command" with "command-s" and that made no difference. I don't know anything about VL-cmdf... Quote Link to comment Share on other sites More sharing options...
MK2015 Posted May 19, 2015 Author Share Posted May 19, 2015 Solution: http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autoarea-lsp/td-p/5637432 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.