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
Autodesk Gallery Powers of Design Exhibit: 10**24 The Local Supercluster   19 Jun, 2013

I work out of our office on One Market Street in San Francisco. My standup-desk is right across from our Gallery at One Market. One of our newer...More>>Read more It's Alive in the Lab blog posts>>

Feed
Tech Toys 360: Pro-Form Le Tour de France Bike   18 Jun, 2013

The greatest bike race in the world is held June 19 to July 21 this year. Celebrating its 100th year, the Tour de France sends riders through more...More>>Read more PTC Creo blog posts>>

Feed
Update 3 now available for Revit 2013 Products - Revit Clinic   18 Jun, 2013

...More>>Read more BIMbuilder blog posts>>

Feed
Nice Design—What Does It Feel Like?   17 Jun, 2013

...More>>Read more SolidWorks Blog posts>>

Feed
LiveMap: The Augmented Reality Motorcycle Helmet of the Future?   18 Jun, 2013

Philippe Starck once famously said that there should be no cars on the road—-only motorcycles. While some soccer moms may disagree, his theory...More>>Read more SolidSmack blog posts>>

Poll
How many years' experience do you have using CAD software?
Less than two years
2–5 years
6–10 years
11–20 years
21+ years
Submit Vote




FREE Resources for CAD, BIM, and PLM Users





Subscribe Cadalyst Newsletters