cadalyst
AutoCAD

Extract that Data! (Circles and Lines AutoCAD Tutorial)

31 Aug, 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


More News and Resources from Cadalyst Partners

For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX.  Visit the Equipped Mold Designer here!


For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP.  Visit the Equipped Architect here!