Workout Centroid of closed polyline
I have a lots of closed LWpolylines (Light Weight type but if your routine works on old style POLYLINES then I can still use it) that are basically rectangular in shape but may also have more than 4 sides sometimes (irregular closed polies). I need to have a routine that will work out the center of the polygon so that I can insert a piece of text in it such as "E" for Electrical. My e-mail is av@computersupport.itgo.com Thanks in advance.ANDREAS.
Comments
-
The Center snap also works for non-circular entities, such as rectangles. That should do the job for simple polygons. For more irregular shapes, try these lisp functions to calculate the center point:http://xarch.tu-graz.ac.at/autocad/stdlib/archive/5/msg00035.htmlHope this helps :-)
0 -
Thanks for that I will give it a go.
0 -
The CENTER trick works well in ICAD but unfortunately this command must work in ACAD as well and ACAD will not support this osnap in this case.However I will try the LISP site you gave me next.Thanks much.Andreas
0