Jump to content

Listing Areas in Acres?


Gregg Bell

Recommended Posts

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

Link to comment
Share on other sites

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)
)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 years later...
  • 6 months later...

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...