AutoCAD

Extract that Data! (Circles and Lines AutoCAD Tutorial)

1 Sep, 2007 By: Lynn Allen

AutoCAD 2008's new Dataextraction command makes data extraction easy and saves you design time.


Over the years, attribute extraction has evolved from a once-cryptic, highly complicated task to something even casual users can tackle. Of course, the word extraction evokes all types of painful thoughts -- but don't let that deter you from giving it a try!

AutoCAD 2008 takes the Eattext command, or the Attribute Extraction Wizard, to the next level and makes it possible to extract object information as well! You'll find the Eattext command doesn't really exist anymore -- it has been replaced with the all-encompassing Dataextraction command (yes, it's a mouthful).

Maybe you'd like to know information about various polyline objects such as length to calculate piping information for a gas line. Dataextraction makes all of this possible. You'll also see that a variety of features focused on attribute extraction have been added to the mix. For example, once you select the data to extract, you can extract it to a file such as Excel or to an AutoCAD table.

Dataextraction Details
To start the Data Extraction Wizard, choose Tools menu / Data Extraction. Heaven knows, you don't want to type this incredibly long command name in. For those of you familiar with the Eattext command of the past, you'll notice some big changes. First off, it asks you to specify the name of your extraction file first, as opposed to at the end of the wizard. The figure below displays the first page in the Data Extraction wizard where you can choose to start a new extraction or edit an existing one. You can also use an existing extraction file (DXE) as a template file to work from. You can also use an existing Eattext template file (extension of BLK) to start from. Remember, template files are your friend -- they save the many settings you select in the Dataextraction command so you can easily repeat the same process without having to reselect everything (we like that).

figure
Page 1 of the Data Extraction Wizard prompts for the name of the extraction file.

After indicating the name of your shiny new extraction file, it asks you to indicate which drawing(s) you want to extract the data from as seen below. In most cases, you will focus on the current drawing, but you can also extract data from multiple drawing files. You can also select specific objects in a drawing, if you want to drill down even further.

figure
Page 2 of the Data Extraction wizard prompts you to indicate the sources you wish to extract data from.

The Settings button on this page ensures you get all of the objects in your selection set for data extraction. Here you'll find that the options include objects from blocks and xrefs. You'll also determine if you want to include all of the objects in your drawing, including your paper-space layouts, or just those in model space.

figure
The Setting option is key to ensuring you get all of the objects needed for data extraction.

You'll find that the new Dataextraction command is a very useful tool for simply counting the blocks in your drawing (much better than counting them manually). To do this, use the Settings option to indicate whether or not xrefs should be included in your block counts.

Moving onto page 3 of the Data Extraction Wizard, you'll see a list of the objects found within the drawing. If you're only after the blocks (or alternatively, only after objects that are not blocks), you can control this in the lower-left corner of the dialog box under Display Options. Here you also can indicate if you want only those blocks with attribute information.

figure
Selecting the correct objects is key to data extraction.

You may decide to change the Display Name to something more meaningful to you. For example, let's say I want to calculate the length of piping I have in my drawing. The pipes are characterized by the arcs, lines, and polylines in my drawing. To make it easy on me, I'll change the display name of these objects to Pipe as seen below. You'll also see that I indicated I wanted to display only those objects that weren't blocks.

figure
It's easy to change the display name to something that makes more sense.

Tip. It's easy to check/uncheck all options with the right-click shortcut menu.

Onto page 4! Now, you're ready to decide the properties of the objects selected you need for your final extraction.

To calculate the total length of pipe, I must select Length. Layer is also important, as I have pipes on different layers (on the gas, water, and sewer lines). The figure below also shows the shortcut menu that lets you check / uncheck all, invert the list or edit the display name of the property. I changed the display name for my Layer property to Type.

figure
Select the properties you want included in your data extraction.

Continuing on through the wizard, I have my extracted data information as shown below. I'm looking to output to an AutoCAD table with just the type and total-length information. That means I'll need to turn off the Count and Name columns in the lower-left corner of the dialog box. I'll also ask AutoCAD to add the total lengths and round off to two places to the right of the decimal. The right-click menu holds all types of options here so you can get the exact output you're after. Make sure you get AutoCAD to do as much of the work for you as possible!

figure
Page 5 of the wizard displays the raw data.

figure
Use the shortcut menu to automatically sum the values and further control the data output.

How do you want your data extraction to be finalized? I'm going to extract it to an AutoCAD table, but you can easily save it to an Excel or Access file. Page 6 lets you determine your final output.

figure
Determine your final output on page 6 of the Data Extraction Wizard.

Vo


AutoCAD Tips!

Lynn Allen

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter


Latest News from Cadalyst Partners
Feed
The Infinite Resource: the case for GMO instead of organic farming   22 May, 2013

I have no desire to eat pesticides. I really don't. Actually when I was a child growing up in New Orleans, a "fog truck" used to come down our...More>>Read more It's Alive in the Lab blog posts>>

Feed
TERA Semicon Drives Its Own Destiny with CAD and PDM   22 May, 2013

When you read the history of TERA Semicon, you can see right away that the company has had a strong vision and direction from Day 1. The South Korean...More>>Read more PTC Creo blog posts>>

Feed
Excel Hyperlinks & Document Management Tricks   22 May, 2013

Do you have to keep track of a lot of different folders and files? Do you wish you peers could open the correct Revit file? Are you tired of having...More>>Read more BIMbuilder blog posts>>

Feed
SolidWorks Simulation Tips: Parameters and Design Studies   22 May, 2013

In my opinion, one of the most underutilized tools in SolidWorks Simulation is the Design Study.  Design studies allow you to easily set up a...More>>Read more SolidWorks Blog posts>>

Feed
Is This the All-in-One Bike Helmet of the Future?   22 May, 2013

For those used to cycling on busy city streets (NYC comes to mind), the need for swift reaction times could be compared to that of catching a fly...More>>Read more SolidSmack blog posts>>

Poll
What type of input device (besides the keyboard) do you use at your primary CAD workstation?
Standard mouse
Trackball mouse
Programmable mouse
3D navigation device
Pen/tablet
Multiple devices
Submit Vote




Considering Wide Format Printing Solutions?
Four FREE White Papers Available:






Subscribe Cadalyst Newsletters