AutoCAD 2013/2014/2015

Posts: 17
Registered: ‎12-03-2012
Message 1 of 7 (689 Views)
Accepted Solution

area problem

689 Views, 6 Replies
01-18-2013 04:50 PM

how to get the area of this polyline .........  


i used properties command >>>





i used li command >>>





i used area then o command >>>> it says that area = 362.5350 ok this is wrong .. 





i calculate the area of the polyline by separating it to parts then subtract the area >>>







368.62 - 7.79 =     360.83  this is the correct area 


actually this is to hard to separate polyline to parts, when i have alot of polyline.

i guess this problem causes, when you have self-intersecting polylines


the file is attached ..


hope you can help thank you all .

*Expert Elite*
Posts: 6,208
Registered: ‎09-16-2009
Message 2 of 7 (667 Views)

Re: area problem

01-18-2013 08:47 PM in reply to: mr-_-small

The area is 368.62

Try area command with the dwg. attached

Posts: 17
Registered: ‎12-03-2012
Message 3 of 7 (659 Views)

Re: area problem

01-18-2013 10:17 PM in reply to: Patchy

no its wrong ... because  368.62 is the area of the big part of the polyline ... 



if you read what i wrote, you would know that the correct area = 360.83 


the area of my polyline should be =(  area of the big part  -  the area of small part )  which is = to  360.83 .


the problem is autocad 2013 get confused when you create self-intersecting polylines and can not determine the area .


and please no one give old link i read about this problem in cad 011 but no such good answer . 

Valued Mentor
Posts: 482
Registered: ‎06-06-2010
Message 4 of 7 (639 Views)

Re: area problem

01-19-2013 08:19 AM in reply to: mr-_-small

Sadly, the area reported by AutoCAD 2011 or higher cannot be trusted.  This has been a known problem since the 2011 release.  If you have access to AutoCAD 2010 or lower you can open the drawing and get the correct area.


The specific problem (for AutoCAD) is when segments overlay, as in the horizontal segment on the left side leading into the smaller area.

*Expert Elite*
Posts: 8,867
Registered: ‎06-29-2007
Message 5 of 7 (632 Views)

Re: area problem

01-19-2013 08:46 AM in reply to: mr-_-small



do you have the option to create regions from your polys? If so you don't need to draw the connection from outline to island. Instead you can create two regions (one for the outer, one for the inner poly), then run command _SUBTRACT to create one region object (that knows it has an island ==> what is not possible with polylines) and that reports the correct area.


I know that regions have other limitations then (like no stretch/grip_stretch), but depending on what has to be solved it might be an option.


- alfred -

Ingenieur Studio HOLLAUS ...
*Expert Elite*
Posts: 3,094
Registered: ‎11-13-2006
Message 6 of 7 (632 Views)

Re: area problem

01-19-2013 08:48 AM in reply to: mr-_-small

I get 360.83 using the MEASUREGEOM command and picking the points that define the two objects. You do not have to separate the drawing.


Or I got rid of the overlapping lines and then used the same command and picked the closed objects (not the points that define them) and get the same answer.



Posts: 17
Registered: ‎12-03-2012
Message 7 of 7 (596 Views)

Re: area problem

01-20-2013 03:59 PM in reply to: mr-_-small


yahoooooooooooooooo i did it ,,, i did it ....


i had to learn basic staff about LISP , but now i did it .. thx god


you just need to open notepad and past this code then rename the file as area1 .lsp - (any thing .lsp)

then drag the file to your autocad or put it in autolisp


now you just need to press aaa then space for sure to use the command select the big one then the small one


one thing is important that your polyline should be spreated 

actually it doesnt matter which to select frist , it just will give you (minus the correct area )


also you can use it to get the area for one polyline


i was thinking of making this function for multi objects by looping it , but it will take time for me to learn how ,  and i dont have it 


here is the code also its attached .


(defun c:aaa ()
 (print "select the big object")
 (setq oo1 (car (entsel "\nSelect a Polyline: ")))
 (setq oo1 (vlax-ename->vla-object oo1))
 (vlax-dump-object oo1 T)
 (setq o1 (vla-get-area oo1))
 (print "select the small object")
 (setq oo2 (car (entsel "\nSelect a Polyline: ")))
 (setq oo2 (vlax-ename->vla-object oo2))
 (vlax-dump-object oo2 T)
 (setq o2 (vla-get-area oo2))
 (setq ss1 (- o1 o2))
 (prin1 "the area of First object = " )
 (prin1 o1)
 (prin1 "the area of Second object = " )
 (prin1 o2)
 (prin1 "the area for subtracting objects = " )
 (prin1 ss1)

 thank you all for your help .... im glad that im here lol .... 

i will give my self best answer loooooool 





You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Connect with AutoCAD