Multiple Area Report
Good afternoon all,
Does anyone know if there is a way to do the following listing with Bricscad V13.
Input:
A layer containing thousands of polygons (Closed Polylines)
Output:
A report of all polygons with two columns with the following format: Polygon Area | Polygon Centroid
Thanks
Does anyone know if there is a way to do the following listing with Bricscad V13.
Input:
A layer containing thousands of polygons (Closed Polylines)
Output:
A report of all polygons with two columns with the following format: Polygon Area | Polygon Centroid
Thanks
0
Comments
-
David,
I have created a lisp routine that reports the area and perimeter lengths of multiple polygons in a drawing to an excel file for another client. I would have to add functionality to calculate and report the centroid of the polygons also, but I think it is something that can be done fairly easily. I would need a sample dwg for an example of exactly what you want.
Thanks,
Kevin
0 -
Hi David,
If you are willing to consider a third-party commercial app, you may want to try our CADPower productivity pack for BricsCAD which has this and 250+ more tools for various .dwg processing.
Look here for more info: www.coordsys.com/cadpower
Best Regards
Rakesh Rao
Smarter .dwg CAD0 -
.......Input: A layer containing thousands of polygons (Closed Polylines)
Output: A report of all polygons with two columns with the following format: Polygon Area | Polygon Centroid
Hi David
here is a lisp routine to do this by following the steps :
1. Convert all your polygons to Regions by using the command REGION
(before converting set the variable DELOBJ =0 to keep the original polygons or DELOBJ =1 to erase them during the conversion)
2 Load the attached Lisp file ExPro2CSV.LSP using the APPLOAD command and call the command ExPro2CSV (Export Properties to CSV file ...comma delimited)
...select the regions and there you are !
You get a comma delimited file like the CSV2.txt which can be imported to Excel for further treatment
I have also included the Handle , a unique identification code for every Region, in case you want to link somehow the
Excel file with the original entities , e.g. import a text for every region etc.
HANDLE,AREA,CENTROID-X,CENTROID-Y,CENTROID-Z
278,84542.963,1918.276,2070.479,0
279,231599.661,2412.821,2189.495,0
27E,568337.902,1976.304,987.31,0
27F,280746.444,1327.07,1475.396,0
280,368903.737,1587.83,2034.549,0
Enjoy !0 -
i have just minimally improved the flow of logic in the function Get_Handle_Area_Centroid ....!
just use the new one !0 -
Hello Konstantin,
Thank you for your LISP.
Unfortunately the REGION command is not available for the Classic version of Bricscad.
So I cannot run your LISP.
My polygons are made of 3D polylines.
Thanks for your help0 -
Note that 3D polylines do not have an area. You would have to project the vertices onto a plane first and then calculate the area.0
-
...
Unfortunately the REGION command is not available for the Classic version of Bricscad.
So I cannot run your LISP. My polygons are made of 3D polylines.
.....
Hello David,
this is an important information that your polygons are 3D polylines.
This means that you don't have any arc segments in your polygons.
In this case it is possible to calculate the centroid of a polygon without converting it to a Region.
I used the free routine provided by Mac-Lee at http://www.lee-mac.com/polygoncentroid.html
As Roy says 3D polylines do not have an area so they have to be converted to 2D LWPOLYLINES...
I have reworked the routine to this end, so now you can select 3D Polylines and 2D LWpolylines and get a list of centroids into a file.
The newly created lwpolylines identical to the 3D ones are not deleted so change the active color before you run the routine
so that you can select and delete them easily afterwards.
I hope this helps !
You find the routine attached and a test file i used0 -
Dear Guys,
Back to the CP_CALCAREA command on CADPower, we have made some significant improvements based on general feedback received from users. Creating a table of centroidal coordinates, area, units conversion, are all part of the CP_CALCAREA command now.
See attached UI.
Best Regards
Rakesh Rao
Smarter .dwg CADcalcarea_dlg.GIF0
This discussion has been closed.