Gregg Bell Posted April 27, 2011 Share Posted April 27, 2011 Hello All, Does anyone know how to list the area of a polyline or by points and have the output displayed in acres? Thanks, Gregg Quote Link to comment Share on other sites More sharing options...
alanjt Posted April 27, 2011 Share Posted April 27, 2011 A very simple LISP I put together: (defun c:TA (/ ss) ;; Total Area of Selected Polylines ;; Alan J. Thompson, 03.15.10 / 11.24.10 (vl-load-com) (if (setq ss (ssget '((0 . "*POLYLINE")))) ((lambda (area leng) (vlax-for x (setq ss (vla-get-activeselectionset (cond (*AcadDoc*) ((setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object) ) ) ) ) ) ) (setq area (+ area (vla-get-area x)) leng (+ leng (vla-get-length x)) ) ) (vla-delete ss) (textscr) (princ (strcat "\nTotal area:\n-----------------\n" (rtos area 2 2) " SF\n" (rtos (/ area 9.) 2 2) " SY\n" (rtos (/ area 43560.) 2 2) " AC.±\n" (rtos leng 2 2) " LF" ) ) ) 0. 0. ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
Gregg Bell Posted April 29, 2011 Author Share Posted April 29, 2011 Thanks for the lisp routine, I love it. Is there a way to put commas in the square foot areas (43560 SF = 43,560 SF)? I'm not familiar with creating or editing lisp routines, so I don't know how hard it is, or should I just be happy with what I have, which I am? Thanks again, Gregg Quote Link to comment Share on other sites More sharing options...
AFitchguy07 Posted December 10, 2013 Share Posted December 10, 2013 how would you take this out to be more precise? Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 10, 2013 Share Posted December 10, 2013 how would you take this out to be more precise? Change the second value in each rtos function. eg. (rtos ) eg. (rtos 2 3) Quote Link to comment Share on other sites More sharing options...
AFitchguy07 Posted December 10, 2013 Share Posted December 10, 2013 Beautiful! Thanks for snappy reply. Quote Link to comment Share on other sites More sharing options...
alanjt Posted December 10, 2013 Share Posted December 10, 2013 Beautiful! Thanks for snappy reply. No problem. You're welcome. Quote Link to comment Share on other sites More sharing options...
lsucasey1 Posted July 8, 2014 Share Posted July 8, 2014 What is the command to utilize this lisp? Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Spaj Posted July 8, 2014 Share Posted July 8, 2014 What is the command to utilize this lisp? Thanks in advance! TA > (defun c:TA (/ ss) Quote Link to comment Share on other sites More sharing options...
RobDraw Posted July 8, 2014 Share Posted July 8, 2014 (defun c:TA This tells you the command is TA. Quote Link to comment Share on other sites More sharing options...
alanjt Posted July 8, 2014 Share Posted July 8, 2014 Question has been answered. I just thought I'd log in to say hello. 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.