Before AutoCAD came with a Data Extraction feature, CAD users had to track their data by hand. Luckily, the DATAEXTRACTION command was created as a method of circumventing this nuisance.

Even after the by-hand method, you could extract data from AutoCAD, but you couldn’t showcase the data on the AutoCAD drawing itself. Once again, newer versions of AutoCAD allow for a more streamlined process. We now can do everything involving our data from within AutoCAD itself.

For the Purposes of this Tutorial, we will be using a drawing file which contains lots of blocks, layers and other object types. You can use your own drawing file to follow along, this tutorial. If you want this tutorial in video format then here it is.

 

For this example, let’s say we are interested in creating, for whatever reason, a table that lists all the properties including the count of blocks used in our drawing. The workflow of doing this using data extraction is explained below.

The same workflow will work for extracting other types of data from drawing using the Data extraction tool

Starting The Data Extraction Wizard

To start the Data Extraction command, type DX into the Command Line and hit ENTER.

The Data Extraction wizard will open on the screen as shown in the image below, with options to create a new data extraction or to edit a pre-existing one.

Choose the Create a new data extraction option in the window, and then click on Next >.

In the next window specify the name of the data extraction file and specify a location where you want to save it and click the Save button. For this example, I will name this data extraction file “Sample DX” and save it on Desktop.

The next page i.e. page 2 of Data Extraction wizard has the Panel on top called “Data source” which involves choosing whether we want to extract data from the whole drawing, or only a specific part.

Since we are interested right now in every block of the drawing, choose the first option as shown by annotation A in the image below and then proceed by clicking Next >.

Understanding options on Page 2 of the Data Extraction wizard

Option B

You can select the second radio button which says, “Select objects in the current drawing” and the box next to this option will activate. Click on the button as shown in option B of the image above and the data extraction wizard will disappear, and you will be able to select objects from your drawing.

After making the selection press enter key and the wizard will pop back in. When you select specific objects from the drawing area the data extraction will happen only from selected objects of the drawing.

Option C

You can also add multiple drawings to extract data for the data extraction table. To add multiple drawings, click the “Add Drawings” button and select drawings from where you want to extract data and click Open Button.

You can also select an entire folder of drawings using the “Add Folder” button and the data will be extracted from all the drawings of the folder.

Option D

You can make additional settings in the data extraction table by clicking the Settings button as shown in the option D of the figure above. You will get a list of checkboxes that look like the figure below.

Here you can choose to extract data from blocks, Xref and include Xref as blocks in the data extraction table. You can also choose to extract data from only model space of the entire drawing using the options in the “Extract from” panel.

For this example, we will leave the default selection as shown in the image above but you can obviously modify it as per data extraction requirement.

As we will be extracting data from a single drawing we will not use options C from page 2 of data extraction wizard. With the default options selected simply click Next on page 2 of the wizard.

Selecting Objects for Data Extraction table

The Window will go through a loading process to a new window called Data Extraction – Select Objects (Pages 3 of 8) as shown in the image below.

This page of the Data extraction wizard has all the type of objects of the drawing listed in the Objects panel. Select the objects from which you want to extract the data. To simplify the list of data types you can use display options which is right underneath the objects panel. Following are the options of this panel.

Display all object types

If you keep this checkbox selected all objects in the drawing will show up in the objects list. You can uncheck this option and select “Display blocks only” or “Display non-blocks only” to show either blocks or non-blocks objects.

Display Block with attributes only

If you check this option AutoCAD will only show blocks that contain attributes in the Objects panel and if you want to extract data from the block containing attributes then this is obviously the option you would want to select.

Display objects currently in-use only

As the name suggests this option allows you to show only the objects used in the drawings. Selecting this option will let you remove objects like blocks or layers which are present in the drawing but are not used anywhere.

For our example I will keep “Display all object types” and “Display objects currently in-use only”  selected and I will uncheck the remaining options as shown in the image below.

The objects panel of page 3 of data extraction also contains a lot of object types which we might not need.

In this case, I will uncheck all the blocks that start with A$C prefix as they are automatically created blocks which we don’t want to use in our data extraction table.

After unchecking those blocks from the Objects panel of page 3 of the data extraction wizard click next.

Now you will see a list of properties of the selected objects. To avoid overwhelming amounts of data in our data extraction table I will uncheck some categories from the category filter and the properties from those categories will hide from the properties panel.

In our example I will only keep Drawing, Misc and Text categories selected as shown in the image below and then click on the Next button.

You can make the properties list even shorter by unchecking the properties that you don’t need in the data extraction table from the Properties panel of page 4 of the data extraction wizard.

I have also unchecked some properties from the Properties panel to simplify our table.

Preparing and Inserting the Data Extraction Table

Now you will have page 5 of the data extraction wizard which will show you the final table. We can modify this table the way we want and here too we will make some customizations.

In page 5 you will see properties like Block Unit, Rotation, Unit Factor listed in different columns.

To hide any column right-click on the name of the column and then select “Hide column” from the context menu. Similarly, you can grab the name of the column and move them to different locations.

Under the table, you will see some checkboxes. Here “Combine identical rows” option will let you combine multiple rows of a single object and show in in a single row. This helps reduce the number of rows of the table.

The “Show count column” checkbox will show or hide the Count column from the table and “Show name column” will show or hide the name column from the table.

When you are done making changes to this table click Next button and you will reach page 6 of data extraction wizard.

On page 6 of the Data extraction wizard, you will only see two checkboxes. The first checkbox “Insert data extraction table into drawing” will let you make an AutoCAD table right inside the drawing.

The second option “Output data to external file” will let you export the data extraction data into an external file like XLS, CSV and TXT.

When you select the second option AutoCAD will let you specify the location where your data extraction file will be saved. You can click the box right underneath the second checkbox and specify a location and name of file and save it on the specified location.

For this example, select both the checkboxes as we will be adding the data in our drawing as well as exporting it into an external file, after selecting the checkboxes click Next button.

Now page 7 of the data extraction wizard will open up where you can change the settings of the table and give your data extraction table a name.

For our example, I will call this table “Sample Data extraction” and now click next button and finally click the Finish button on the last page of the data extraction wizard.

The table will now show up on your cursor and you can click anywhere in the drawing area to place this table.

If this table is very tiny or large you can use Scale command to resize it properly. We will also have an excel table on the location we specified with all the selected data.

The final table extracted in my drawing looked like the image shown below.

This table is obviously not the complete table and the actual table had more rows as well as columns but here I am only showing a part of my table, just for reference.

One of the best things about this table is that it is linked with your drawing and if you change the property of any object which is available in this table then the property will also update in the table.

If the property did not update automatically in the table then you can select the table then right-click and select “Update table data links” as shown in the image below.

Summary

So, as shown in this tutorial you can use the data extraction tool to extract many different kinds of data from your drawing and add that table in your drawing as linked entity or export it as an external file.  I hope you will find this tutorial helpful if you have any question related to this tool feel free to let me know in the comment section below and I will try my best to answer it.

Get 150 AutoCAD commands and AutoCAD Quiz eBook in your inbox
Subscribe Now
No Spam, Unsubscribe anytime.