Gregg Bell Posted April 27, 2011 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
alanjt Posted April 27, 2011 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
Gregg Bell Posted April 29, 2011 Author 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
AFitchguy07 Posted December 10, 2013 Posted December 10, 2013 how would you take this out to be more precise? Quote
alanjt Posted December 10, 2013 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
AFitchguy07 Posted December 10, 2013 Posted December 10, 2013 Beautiful! Thanks for snappy reply. Quote
alanjt Posted December 10, 2013 Posted December 10, 2013 Beautiful! Thanks for snappy reply. No problem. You're welcome. Quote
lsucasey1 Posted July 8, 2014 Posted July 8, 2014 What is the command to utilize this lisp? Thanks in advance! Quote
Spaj Posted July 8, 2014 Posted July 8, 2014 What is the command to utilize this lisp? Thanks in advance! TA > (defun c:TA (/ ss) Quote
alanjt Posted July 8, 2014 Posted July 8, 2014 Question has been answered. I just thought I'd log in to say hello. Quote
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.