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 .
Solved! Go to Solution.
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 .
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.
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 -
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.
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") (vl-load-com) (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") (vl-load-com) (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)) (print) (prin1 "the area of First object = " ) (prin1 o1) (print) (prin1 "the area of Second object = " ) (prin1 o2) (print) (prin1 "the area for subtracting objects = " ) (prin1 ss1) (princ) )
thank you all for your help .... im glad that im here lol ....
i will give my self best answer loooooool
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.