• Home
  • Training Books
  • Subscribe to Our Email Newsletter
  • About
    • Contributors
    • Feedback
    • Contact
    • Privacy policy
    • Cookie Policy

CADnotes

CAD Tutorials and Best Practices for professionals and students

  • Featured
  • AutoCAD
    • AutoLISP
  • Revit
    • Revit Architecture Basic
    • Revit MEP Basic Tutorial
  • Inventor
  • MicroStation
    • MicroStation Basic Tutorial
  • CADnotes on YouTube
You are here: Home / AutoCAD / How to extract block attributes in AutoCAD LT

How to extract block attributes in AutoCAD LT

November 8, 2013 by Edwin Prakoso 12 Comments

In this Article...

  • Creating the template file
  • Using Attribute Extraction
  • Opening the extraction result in Microsoft Excel
  • Video Guide
  • You still need some works to do

Are you familiar with data extraction? It’s a great tool to generate reports 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 a 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 a 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 using characters (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 characters, 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 the door is DOORTYPE. And for windows it’s WINDOWTYPE.

door_type_attributes

Add the attribute tag’s 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 the command line.

attribute_extraction

You can leave CDF as the 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 the open file button. Open the extraction result. Don’t forget to change the file type to all files.

Excel will open file import wizard.

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

The second step is an important step. Change the delimiters to the comma. And change the text qualifier to a 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

Video Guide

You can follow all the steps above in the video below.

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?

About Edwin Prakoso

I work as a Solution Consultant in Datech Solutions, Tech Data Indonesia. I've been using AutoCAD since R14 and Revit since Revit Building 9. I occasionally write for AUGIWorld magazine and I am also active in Autodesk discussion forum. I'm a member of Autodesk Expert Elite, an appreciation for individuals who give contributions to the Autodesk community.
Connect with me on twitter or LinkedIn.

Filed Under: AutoCAD

5 1 vote
Article Rating
Subscribe
Login
Notify of
guest

guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

12 Comments
Inline Feedbacks
View all comments
JASON
JASON
2 years ago

works perfectly for what i am using it for. i have just one gripe. when i extract the data and it counts all the instances of say 1 particular type with both text and numerical values how can i get this to order all matching values into 1 line? i think i have to do it in excel but i am having difficulties getting it to do what i would like.

Thanks again.

0
Reply
Kooiman, lou
Kooiman, lou
3 years ago

I only get error : ** Invalid field specifacation.
I’m using :
BL:NAME C016000
DOORTYPE C003000
WINDOWTYPE C003000

what did i wrong?

0
Reply
Crawford Scott
Crawford Scott
3 years ago

Hi,
I’ve made a template file with 12 attributes.
I get the message “field error”.

I’ve tried several template files all saying the same thing “field error”
So I made a template file with just the name.
BL:Name C008000 and it still says field error

What am I doing wrong?

Thanks in advance

Crawford

0
Reply
filip vermaere
filip vermaere
6 years ago

Hello,

I downloaded your Acadfile and created a tamplate file like yours but i doesn’t work here…?
I don’t know whay I’m doing wrong.

1
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  filip vermaere
6 years ago

Hi Filip,

Did you type the template file content or copy and paste it from the website?
What result did you get after you run the command?

0
Reply
DC Madam
DC Madam
7 years ago

Thank you very much for a clear step-by-step tutorial. I looked for days for an explanation for my enability to use the “dataextraction” command in AutoCAD LT 14. While it will take some preparation and practice, the ATTEXT command is certainly useful.

0
Reply
Telecom
Telecom
7 years ago

I am glad I found your post. You have done a great job outlining how to extract data. This is exactly what I have been trying to do in LT. Your examples were easy to follow, and worked great. Keep up the good work.

Thank you!

0
Reply
Happier Designer
Happier Designer
7 years ago

Thank You! This is a life saver. I don’t have the budget for full blown AutoCAD at this time but counting blocks is a huge part of my job as a furniture planner.

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Happier Designer
7 years ago

Glad that I can help!
If you only want to count block, you might be interested in this workaround: https://www.cad-notes.com/bcount-alternative-for-autocad-lt/

0
Reply
Bobby Ruby
Bobby Ruby
8 years ago

Thanks so damn much… always used attout. Now I’m good thanks to your post… Thank you!

0
Reply
Zeno DeleonGuerrero
Zeno DeleonGuerrero
9 years ago

I work for CUC, the utilities of Commonwealth of the Northern Marianas Islands. I am trying to extract some attributes from my autocadd drawings and I’m having problems. I followed the template you provided but it keeps saying invalid. Could you assists me
Zeno

0
Reply
Edwin Prakoso
Edwin Prakoso
Author
Reply to  Zeno DeleonGuerrero
9 years ago

The template I provided was specifically for drawing in my example. You need to define your own template by following the tutorial. Or modify it to match your block attributes.

0
Reply
wpdiscuz   wpDiscuz
Join Our Free Email Newsletter
  Thank you for Signing Up
Please correct the marked field(s) below.
1,true,6,Contact Email,2 1,false,1,First Name,2 1,false,1,Last Name,2

Featured

Doing computer exercise

How to pass Autodesk Professional certification

Do you plan to take Autodesk certification exam? Here are some tips and tricks to pass the exam. The questions are not difficult, but you need some tricks and strategy to easily pass it!

Recent Articles

  • Model-Based Progress Tracking in Autodesk Build
  • Understanding Surface and Cut Patterns in Revit
  • Revit 2024.1 Update is Released

Advertisement

New on CADnotes

  • Model-Based Progress Tracking in Autodesk Build
  • Understanding Surface and Cut Patterns in Revit
  • Revit 2024.1 Update is Released
  • What’s New in Revit 2024: Bending Detail
  • What’s New in Revit 2024: The Dark Theme

Meet the Authors

avatar for
avatar for
avatar for
avatar for
avatar for
avatar for

Get Connected

CADnotes on FacebookCADnotes on InstagramCADnotes on TwitterCADnotes on YouTube

© 2009 – 2023 CADnotes · Feedback · Privacy Policy · Become an affiliate

wpDiscuz