[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Summarize Object Areas
Tip# 3562 By Juan Villarreal On 15-Jan-2011
1
Rated By 1 users Downloaded : 1771
Categories : Area, Tables
Software type : AutoCAD 2011
Rename File To : AC_AREA-CALC_v2.1.lsp
Find the areas of individual closed objects and all selected objects.

Editor's note: This LISP program was updated to v2.1 in April 2011. The table format is completely different, as it uses separate columns for each unit, and it has been modified to use a CSV file type.

Juan Villarreal has submitted a great LISP program named AC_Area-Calc. This routine allows you to select any number of closed objects in AutoCAD, such as polylines, circles, splines, etc., and a summary table will be constructed to report the area of each object and the total area overall. Start by loading the LISP file, then type in the command AC. The first prompt allows you to filter the selection by entity type, if you like. After you make your selection, a dialog appears with many options for area conversion, precision, and type of output. You can output the table to a table entity in AutoCAD, lines and text in AutoCAD, a TXT file, or a Microsoft Excel file. The first two options also allow you to use fields in the table so that if the closed areas are edited, the area labels in the table will stay in sync. Although there are not a lot of comments in the code, this is a good example of creating a dialog at run time, and how to create fields using LISP.

 

Average Rating:
1


User comments
Comment by Chang,Sam
Posted on 2012-02-06 13:49:08
This is a great routine to extract areas from multiple rooms of a building complex floorplan. The table it generates in the column "ID" label is assigned with sequential area number, viz. "Area 1", "Area 2", etc. I was wondering how to change / modify the lisp program to show the ID label with the designated room numbers? Obviuosly, the routine would hvae to capture the room numbers. This would be very useful to verify and cross-check the areas with the room numbers on the drawing and the table. Thanks very much. Sam
Comment by Chang,Sam
Posted on 2012-02-06 13:49:18
This is a great routine to extract areas from multiple rooms of a building complex floorplan. The table it generates in the column "ID" label is assigned with sequential area number, viz. "Area 1", "Area 2", etc. I was wondering how to change / modify the lisp program to show the ID label with the designated room numbers? Obviuosly, the routine would hvae to capture the room numbers. This would be very useful to verify and cross-check the areas with the room numbers on the drawing and the table. Thanks very much. Sam
Comment by Haglund,James
Posted on 2012-05-01 14:03:53
I too like this routine and appreciate you sharing your work. It will very well received at our office. Can someone tell me how to get the label that is inseted inside the closed polyline to come in at a specific height? (mine come in so small) Thanks in advance Jim
Comment by Villarreal,Juan
Posted on 2012-05-04 15:40:03
The size for the label is controlled by the "textsize" variable.
Comment by Walker,Carol
Posted on 2012-08-23 18:56:43
Hello Juan. I'm getting this error after selecting a simple rectangle using AC command: = centered; is_default = true; is_cancel = true; <bad argument type: streamp nil>