PDA

View Full Version : Quick adding of multiple closed polyline areas



CBLENDERMANN
2004-09-14, 02:41 PM
Hi,
I am working on large site development with lots of independent landscaped areas.
I currently use the AREA command routine to add them all up.
Does anybody know of a routine that would allow me to select all the closed polylines and return their total area?

Thank you for any input in that matter
Cord Blendermann

mjfarrell
2004-09-14, 02:59 PM
Cord,

If you had access to MAP you could query all those areas
and export the results to excel and or label them in about 45 seconds.
I know you asked for lisp, this is just another option.

CBLENDERMANN
2004-09-15, 02:37 PM
Thanks for the replies, the LISP routine worked great.
Good Day to ALL
Cord b.

peter
2004-09-17, 07:57 PM
Another way using activex and including circles and ellipses

Peter Jamtgaard



(defun C:plArea (/ intCount entSelection lstEntity objSelection
ssSelections )
(princ "\nSelect Polylines: ")
(setq ssSelections (ssget (list (cons 0 "*polyline,circle,ellipse")))
sngTotal 0
)
(repeat (setq intCount (sslength ssSelections))
(setq intCount (1- intCount)
entSelection (ssname ssSelections intCOunt)
objSelection (vlax-ename->vla-object entSelection)
)
(setq sngTotal (+ sngTotal (vla-get-area objSelection)))
)
(princ "\n")
(princ sngTotal)
(princ " sq. inches")
(princ "\n")
(princ (/ sngTotal 144.0))
(princ " sq. feet")
(princ)
)

susanr
2008-05-28, 11:37 PM
Is there a way to only choose the area of a polyline on a certain layer? I am assuming (because I am fairly new to this) that the 0 is dxf for type of entity. How would I query for all polylines', circles' and ellipses' area on the layer FPL-Area? Thanks. I hope this makes sense.

Sassy

rkmcswain
2008-05-29, 12:15 PM
Is there a way to only choose the area of a polyline on a certain layer? I am assuming (because I am fairly new to this) that the 0 is dxf for type of entity. How would I query for all polylines', circles' and ellipses' area on the layer FPL-Area? Thanks. I hope this makes sense.

Sassy

Rather than add on to a 3.5 year old thread, you might have better luck posting a new thread.

But to answer your question with psuedocode

Use (ssget) with filters to filter out polylines, circles and ellipses on the layer FPL-Area layer.
Then iterate this selection set, querying the area of each object and adding to the total.

susanr
2008-05-29, 04:21 PM
Thank you.

Sassy