Author Topic: cab ! area calculate  (Read 1587 times)

0 Members and 1 Guest are viewing this topic.

dussla

  • Bull Frog
  • Posts: 286
cab ! area calculate
« on: September 25, 2008, 11:35:55 PM »
hello , cab
i seen your modified code about area
http://www.theswamp.org/index.php?topic=8595.msg109783#msg109783

that is really good
can you help some

in this code  , i have to select  1 times for area
i would llike to select multi objects for area at once

pls ,can you help me some

always thank you good help

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: cab ! area calculate
« Reply #1 on: September 25, 2008, 11:49:48 PM »
I'm off to bed but will chack back in the morning.

You want to select a group of objects & get the TOTAL area of all selected?
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Alan Cullen

  • Guest
Re: cab ! area calculate
« Reply #2 on: September 26, 2008, 12:02:36 AM »
Try this one...it may help you.....

Code: [Select]
;;---------------------------------------------------------------------------
;; AREA.LSP       
;;===========================================================================
;;DESCRIPTION: RETURN SUM OF AREAS OF SELECTED CLOSED POLYLINES
;;
;;START COMMAND........   AAT
;;
;;Select boundaries one at a time....i.e. select one ENTER
;;                                        select next ENTER
;;When finished selecting hit ENTER
;;
;;WRITTEN BY:             ALAN CULLEN           March 2005
;;
;;

(defun c:aat ()

 (princ "\n TOTAL AREAS OF SELECTED BOUNDARIES - March 2005 - Alan CULLEN")
 (princ)

 (setq ocmd (getvar "CMDECHO"))
 (setvar "CMDECHO" 0)
 (setq test 1)
 (setq aatotal 0)
 (setq no 0)
 (while test
  (prompt "\n Select string....")
  (setq ss (ssget))
  (if (/= ss nil)
   (progn
    (command "AREA" "O" ss)
    (setq aa (getvar "area"))
    (setq aatotal (+ aatotal aa))
    (setq no (+ no 1))
    (command "CHANGE" ss "" "P" "C" 4 "")
   )
   (progn
    (setq test nil)
 )))
 (setq aatxt (rtos aatotal))
 (setq notxt (rtos no 2 0))
 (princ (strcat"\n AREA TOTAL = "aatxt"      No of plines = "notxt))
 (setvar "cmdecho" ocmd)
 (princ)
)
« Last Edit: September 26, 2008, 12:06:23 AM by Alan Cullen »

VovKa

  • Water Moccasin
  • Posts: 1616
  • Ukraine
Re: cab ! area calculate
« Reply #3 on: September 26, 2008, 04:15:48 AM »
cool stuff from Alex Rivilis
http://www.maestrogroup.com.ua/support/GeomProps.zip
see the screenshot