How to extract block attributes in AutoCAD LT

Are you familiar with data extraction? It’s a great tool to generate report from any object properties in your drawing. Unfortunately this tool is only available in AutoCAD, not in AutoCAD LT.

Many people don’t know that AutoCAD LT (and AutoCAD) has similar tool to data extraction. Unfortunately, this tool is limited to extract block properties and block attributes.

block and references

Yes, it’s limited. But if you need to create schedule or report from blocks in your drawing, then this tool can help.

If you want to try this feature with the same drawing file, you can download the DWG file here.

Creating the template file

The first thing you need to do is to create a template file. You can create it using notepad.

In the text file define what you want to extract. Add in each line the properties you want to extract.

The format is:

Properties name [space] format.

BL:NAME Cwww000

  1. For block name, the properties name is BL:NAME
  2. Block name is character (string) and I limit the name length to 16 characters. So I added C then I replace the www with 016.
  3. 000 is used for the number of decimal places if the format is number. But for character, it’s always 000.

So for block name in my template, I write:

BL:NAME C016000

I also want to extract my block’s attribute. In this sample, the attribute tag for door is DOORTYPE. And for windows it’s WINDOWTYPE.

door_type_attributes

Add the properties name in separate lines.

So my template file would be like this.

attext_template

Now we can save this template as txt file.

Block has 15 extractable properties. If you want to see all 15 block properties, you can see all possible fields in this AutoCAD help page. And certainly you can add your own attributes.

Using Attribute Extraction

After we define the extraction template, we can extract the attributes now.

Type ATTEXT at command line.

attribute_extraction

You can leave CDF as file format. Now click Select objects and select blocks you want to extract. In this sample you can select everything. AutoCAD will process only blocks with attributes.

Notice that the columns are also blocks. But ATTEXT will not process it because they don’t have attributes.

Select the template file and output file, then click OK.

This is the attribute extraction result.

attribute_extraction_result

Opening the extraction result in Microsoft Excel

The result may look unreadable. Now let’s open it in Microsoft Excel to finish the report.

Open Microsoft Excel. Then click open file. Open the extraction result. Don’t forget to change the file type to all files.

Excel will open file import wizard.

In first step, leave the format as delimited. Click next.

The second step is the important step. Change the delimiters to comma. And change the text qualifier to single quotation mark.

As you can see, the data preview is now showing the correct format.

You can click finish now.

delimiters_and_text_qualifiers

You should be able to see your extraction result correctly in Excel now!

extraction_in_excel

You still need some works to do

As you can see, you still have some works to do to finish the schedule. You can do it in Excel to sum the total number of doors and windows. However, using attribute extraction is much better than count them manually.

You also may need to add attributes to your blocks to extract the data correctly. If you are not familiar with block and attributes, you may be interested to read our “AutoCAD Block Best Practices” e-book.

So do you think this feature is useful? As an AutoCAD user, in which situation attribute extraction is better than data extraction? And for AutoCAD LT users, do you think this feature is useful?

Leave a Reply

Your email address will not be published. Required fields are marked *