Quantity with AutoCAD 2008 : _EATTEXT command
I have been asked for how to count the blocks in the drawing recently. Here is the answer; by means of a simple command called ATTEXT. But when I study the ATTEXT command to use in my article, I see there are much more powerful commands like EATTEXT in versions 2004-2007 and DATAEXTRACTION in version 2008. And I realize that sometimes we better take a look at the new commands instead of using the old ones. So I did and decided to explain the command to you.
The command has an option to output the drawing properties, object properties and block attributes as a data table or a external file or a EXCEL file (as a link). It is very useful for the drawers dealing frequently with blocks.
To use the command you can either type DATAEXTRACTION or EATTEXT to the command line or clicking ‘Data Extraction…’ in the ‘Tools’ menu or clicking the relevant button in the Modify II toolbar (Figure 1).
Fig.1
After that, there comes a eight-step wizard screen. I will also follow this wizard and explain it step by step. We will deal with the block attributes and do the settings according to this.
Step 1: Creating a new DXE file
Fig.2
In this step , we decide on creating a new file or work on the existing one. DXE files store the settings and data formed by using the command. The data table we are going to use constitutes the following steps of the command and there is no connection with the DXE file. We will create a new file in our example. You could select ‘Use previous extraction as a template (.dxe or .blk)’ option if you created a file earlier and want to use the same settings. But the selected file is going to be used as a template, do not forget this. The name for new DXE file is going to be asked before continuing the next step. Keeping these kind of files in any order you use is very important as I have always emphasized in my previous articles.
Step 2: Defining Data Source
Fig.3
You can use either a single drawing or multiple drawings or objects in the drawing like I did as data source. But in order to extract data through several drawings, you may utilize the ‘Add Folder…’, ‘Add Drawings…’ and ‘Remove’ buttons near the ‘Drawings/Sheet set’ option. There is a small button near the option which we used in the example (Select objects in the current drawing) to select the objects. I chose the objects which is in the related area of the drawing. The first thing that attract your attention during selection is that the objects other than blocks can olso be selected. We will deal with this subject later. But before, there are some settings we have to deal with; for this reason we have to click ‘Settings…’ button.
Fig.4
This screen is about how far we are going to go in detail. We are interested in blocks but as I said before this option isn’t about blocks only. Thus, these settings can be very useful for some of you. Sometimes POLYLINEs and their geometric data can also be very useful.
Step 3: In which objects we are interested?
Fig.5
As we are dealing with blocks, please unclick ‘Display all object types’ option and click ‘Display blocks only’. We can filter the blocks with only attribute information with ‘Display blocks with attributes only’ option, that’s what we are using in this step. ‘Display objects currently in use only’ option on the other hand, eliminates the objects like unused blocks, text styles etc. in the drawing. This option becomes important when you are dealing with one or more drawings. Yet, we did our object selection ourselves. That makes this option pointless.
Step 4: Selecting the data we want to extract…
Fig.6
The category list in the right is very illustrative in this step. Block attributes is very important for us, in fact it is our issue. For this reason ‘Attribute’ option has to be selected. The information about the drawing will also be extracted if ‘Drawing’ opiton is selected. I am selecting it in case it may be useful for the title, but I examine and unselect the unnecessary options in the left menu. The others depend on your need.
Step 5: Organize the data completely…
Fig.7
The data list is ready now. The block list and their counts are now being determined. We can group similar lines by ‘Combine identical rows’ option. Yet, identification has to be supported not only by names but also by attributes. That means block names and attributes have to be same. Even that grouping process can be done easily in the extraction file, I click ‘Sort Column Options…’ button for a exacting study. I make the programme sorted by block name and then by a block attribute called ‘NO’ in the window shown in Figure 8.
Fig.8
Data matching can be done through external excel files by ‘Link External Data…’ button. This is a comlicated subject and I do not want to explain in this article. I may explain this subject in my following articles.
Step 6: Deciding output…
Fig.9
There are two kinds of output types in this command. One of them is adding to drawing as a TABLE object and the other is saving as a file. .xls, .csv, .mdb and .txt type of file formats are supported. Forget about the CSV ve TXT type of formats as no one uses these when there are options for EXCEL and ACCESS softwares. In our example EXCEL type of file is being used. As selecting this option, command is concluded. But, if you want to add data to drawing as a table, you’d better take a look at the rest of the article.
Step 7: Table Style…
Fig.10
After doing the table settings and clicking the ‘Finish…’ button, you are requested a coordinate to add the table and also your excel file is being prepared if relevant option was selected.
The output excel file is like the one in Figure 11.
Fig.11
The table format of the same list can be seen in Figure 12.
The command has an option to output the drawing properties, object properties and block attributes as a data table or a external file or a EXCEL file (as a link). It is very useful for the drawers dealing frequently with blocks.
To use the command you can either type DATAEXTRACTION or EATTEXT to the command line or clicking ‘Data Extraction…’ in the ‘Tools’ menu or clicking the relevant button in the Modify II toolbar (Figure 1).
Fig.1
After that, there comes a eight-step wizard screen. I will also follow this wizard and explain it step by step. We will deal with the block attributes and do the settings according to this.
Step 1: Creating a new DXE file
Fig.2
In this step , we decide on creating a new file or work on the existing one. DXE files store the settings and data formed by using the command. The data table we are going to use constitutes the following steps of the command and there is no connection with the DXE file. We will create a new file in our example. You could select ‘Use previous extraction as a template (.dxe or .blk)’ option if you created a file earlier and want to use the same settings. But the selected file is going to be used as a template, do not forget this. The name for new DXE file is going to be asked before continuing the next step. Keeping these kind of files in any order you use is very important as I have always emphasized in my previous articles.
Step 2: Defining Data Source
Fig.3
You can use either a single drawing or multiple drawings or objects in the drawing like I did as data source. But in order to extract data through several drawings, you may utilize the ‘Add Folder…’, ‘Add Drawings…’ and ‘Remove’ buttons near the ‘Drawings/Sheet set’ option. There is a small button near the option which we used in the example (Select objects in the current drawing) to select the objects. I chose the objects which is in the related area of the drawing. The first thing that attract your attention during selection is that the objects other than blocks can olso be selected. We will deal with this subject later. But before, there are some settings we have to deal with; for this reason we have to click ‘Settings…’ button.
Fig.4
This screen is about how far we are going to go in detail. We are interested in blocks but as I said before this option isn’t about blocks only. Thus, these settings can be very useful for some of you. Sometimes POLYLINEs and their geometric data can also be very useful.
Step 3: In which objects we are interested?
Fig.5
As we are dealing with blocks, please unclick ‘Display all object types’ option and click ‘Display blocks only’. We can filter the blocks with only attribute information with ‘Display blocks with attributes only’ option, that’s what we are using in this step. ‘Display objects currently in use only’ option on the other hand, eliminates the objects like unused blocks, text styles etc. in the drawing. This option becomes important when you are dealing with one or more drawings. Yet, we did our object selection ourselves. That makes this option pointless.
Step 4: Selecting the data we want to extract…
Fig.6
The category list in the right is very illustrative in this step. Block attributes is very important for us, in fact it is our issue. For this reason ‘Attribute’ option has to be selected. The information about the drawing will also be extracted if ‘Drawing’ opiton is selected. I am selecting it in case it may be useful for the title, but I examine and unselect the unnecessary options in the left menu. The others depend on your need.
Step 5: Organize the data completely…
Fig.7
The data list is ready now. The block list and their counts are now being determined. We can group similar lines by ‘Combine identical rows’ option. Yet, identification has to be supported not only by names but also by attributes. That means block names and attributes have to be same. Even that grouping process can be done easily in the extraction file, I click ‘Sort Column Options…’ button for a exacting study. I make the programme sorted by block name and then by a block attribute called ‘NO’ in the window shown in Figure 8.
Fig.8
Data matching can be done through external excel files by ‘Link External Data…’ button. This is a comlicated subject and I do not want to explain in this article. I may explain this subject in my following articles.
Step 6: Deciding output…
Fig.9
There are two kinds of output types in this command. One of them is adding to drawing as a TABLE object and the other is saving as a file. .xls, .csv, .mdb and .txt type of file formats are supported. Forget about the CSV ve TXT type of formats as no one uses these when there are options for EXCEL and ACCESS softwares. In our example EXCEL type of file is being used. As selecting this option, command is concluded. But, if you want to add data to drawing as a table, you’d better take a look at the rest of the article.
Step 7: Table Style…
Fig.10
After doing the table settings and clicking the ‘Finish…’ button, you are requested a coordinate to add the table and also your excel file is being prepared if relevant option was selected.
The output excel file is like the one in Figure 11.
Fig.11
The table format of the same list can be seen in Figure 12.
0 comments:
Post a Comment