This is quick “how to” create a block with an area field which value adjust automatically when the polyline attached to that field is amended.
- Create a polyline.
- Open Attribute Definition window and set up typical attribute parameters.
(command: ATTDEF) - Click Insert Field button.
- From a list with field names choose Object.
- Click the button on the left of the Object type field and choose your polyline.
- Choose property Area (if it’s not chosen automatically) and choose desired precision.
- Click on the button called Additional Format… A new window will pop up.
- Enter desired conversion factor. E.g. If your drawing is in mm and you want area to be expressed in meters enter 0.0001
- Enter desired suffix if you wish. E.g. For square meters you can enter m\U+00B2. \U+00B2 will be replaced with ². You can also copy that symbol from Windows Character Map.
- Confirm hitting OK to close all windows.
- Choose a position for your new field.
- Create a block with any additional elements you wish for.
Now a field in your block is connected with a polyline.
After you amended a polyline you need to regenerate to see the changes in the area field.
To create another block connected to another polyline you need to:
- Copy the block.
- Create or copy a polyline.
- Double clicking on the block. Enhanced Attribute Editor window will pop up.
- Choose area field.
- Double click the value (it should have gray background) A Field window will open.
- Click the button on the left of the Object type field and choose your NEW polyline.
- Set up fields in the Additional Format again (it’s a little irritating)
- Accept the changes by pressing OK.
or
- Select a block and a connected to it polyline.
- Amend the shape of the copied polyline.
- Regenerate to see the change in the area field.
Tell me if you know the faster way.
Note:
Data from attributes in blocks can be extracted and use in Excel.
A Table inside AutoCAD (2013) can be created with data extracted from attributes from blocks. Data in the Table can be updated after any amendments to polylines.
After you link one of the att blocks to a polyline you can copy both at once and the new att block is linked to the new polyline. Use add or subtract vertices to modify the polyline. this keeps you from having to take the time to reattach and modify the format.
It works as well. Thank you for your comment 🙂
Hi, thanks for nice tutorial! Everything works until I choose new polyline. Then I lose all settings from “Additional Format” panel. Do you know why?
Hi. Thx for your comment. The same always happens to me. There is another option to copy a block with the polyline connected to it. I have updated the tutorial. Please check it again.
While generating an Area statement, we need table with room names and respective areas. Hence while creating these Attributes and then their blocks, is there any way to add the room names to these blocks ?
Hi Rajesh,
Yes. One block can have many attributes. My tag on the second image in this post have also a room name attribute.
When new instances are created, and new poly line are assigned. The value changes in the attribute. But every attributes value changes. Any solution for this problem ?
Sorry. I suppose this problem is outdated. I would need to know more details about this problem. Please check how the block is build. If it was modified maybe it needs to be updated. Please then check this post: http://pablab.pasart.net/autocad-update-attributes-in-blocks/
Hey! Great tutorial, just what I needed!
I am however having a slight problem..
When I make a copy of the block and select a new polyline, the formatting for how it shows the area has been reset, so I have to spend time setting the conversion factor and suffix every time. Is that how it’s supposed to be, or am I missing something?
Unfortunately it works like this. Please see the second point no.7
I’ve completed the steps, but all I end up with is a tag that says “area” It doesn’t display an area and it is not linked to the box I created. Thanks!
You probably did something wrong 😉
I want to list all the Room areas in a excel file as fast as possible.
Whats the quickest way to do it?
And If possible I want the AutoCAD to show me Area in Ropani-Aana- Paisa-Dam
1 Ropani =16 Aana
1 Aana = 4 Paisa
1 Paisa =4 Dam
1 Dam = 21.39 sq, ft.
Hi, I’m not working in AutoCad for a long time. I’m sure that you can make a Table listing all room tags and then extract data from it to an excel file.
You can find some tools on Annotate tab.
Regarding these unusual measurements unfortunately I won’t be able to help you. Probably it would be possible with a script in AutoCAD. I’m quite sure it could be done in Revit with a use of Dynamo.
does anyone think their is a way to create a LISP that could prompt for a closed polyline to be selected then prompt for a block to be selected and it would quickly do all these steps without all the prompts and clicking and such? Like if the attribute was called “room area” and the lisp knew to fill the attribute named “room area” in the selected block with the area Field for the selected polyline.
IDK I don’t know how to make the lisps, but I use them a lot and usually the people that know how to use AUTOlisp are pretty cool about helping create solutions to problems we all have.
Hi, Unfortunately I don’t know how to write LISP.