Understanding Block Attributes

Block attributes are an additional feature of blocks that are very useful. Block attributes store informational data. This data can be defined as a constant value, or can be input by a user at the moment the block is inserted, or edited afterward.

Tip

There is no limit to the number of attributes that can be associated with a block. I have attached 20 or 30 attributes to title sheets, for example. When the title sheet block is inserted into the current drawing, the user is prompted for various values: the sheet number, title, project engineer’s name, CAD technician’s name, and so on. This is useful for guaranteeing that appropriate data is added to a drawing and not accidentally overlooked.


When creating attributes for a block, it is important to control the sequence by which a user is prompted for data. For example, if a block will prompt for a series of data, and this data appears onscreen in alphabetical order, it makes sense to prompt the user for the data in the same order in which it appears onscreen.

To demonstrate how to control the sequence, AutoCAD prompts for attribute values; the following exercise creates two block definitions from a circle object that has five attributes. For the first block, the attributes are selected from top to bottom. For the second, the attributes are selected from bottom to top. Finally, the two blocks are inserted so that you can observe the order in which you are prompted to define values for the attributes.

Exercise 9.4 Determining the Order Attributes Prompt for Values

1.
Open the 09DWG03.DWG drawing file on the accompanying CD.

The drawing already contains the circle and five attributes you will use to define the two blocks.

2.
From the Draw menu, choose Block, Make. The Block Definition dialog box appears.

3.
In the Name list box, type C1 .

Tip

AutoCAD 2002 allows you to use extended symbol names when naming blocks. This feature provides the capability to use upper- and lowercase characters, as well as spaces, in block names.

4.
Click the Pick Point button. The Block Definition dialog box is temporarily dismissed.

5.
Using Center Osnap, select the circle. AutoCAD picks the circle’s center as the block’s base (insertion) point. The dialog box reappears.

6.
Click the Select Objects button. The Block Definition dialog box is again temporarily dismissed.

7.
Select the circle object first, and then select each attribute from the top down, then press Enter. Once again the dialog box appears.

8.
In the Objects area, click the Retain option button, and then click OK. This completes the first block. Next, you create the second block.

9.
From Draw, choose Block, Make. The Block Definition dialog box appears.

10.
In the Name list box, type C2 .

11.
Click the Pick Point button. The Block Definition dialog box is temporarily dismissed.

12.
Using Center Osnap, select the circle. AutoCAD picks the circle’s center as the block’s base point and the dialog box returns.

13.
Click the Select Objects button. The Block Definition dialog box is temporarily dismissed.

14.
Select the circle object first, and then select each attribute from the bottom up, then press Enter. The dialog box reappears.

15.
In the Objects area, ensure that the Retain option button is still selected, then click OK.

AutoCAD creates the second block, and leaves the objects used to define the blocks. Next, you insert the two blocks to observe the order AutoCAD prompts to fill in the attributes.

16.
From the Insert menu, choose Block. The Insert dialog box opens.

17.
Choose C1 from the Name drop-down list, if it is not already displayed.

18.
In the Insertion Point area, be sure the Specify On-Screen option is selected. In the Scale and Rotation areas, be sure the Specify On-Screen option is cleared.

19.
Click OK to close the Insert dialog box.

20.
Choose a location near the center of the screen to insert the block. AutoCAD prompts for the attribute values at the command line.

21.
When AutoCAD prompts for the first attribute value, type 1 . At each subsequent prompt, type the numbers 2 , 3 , 4 , and 5 , respectively.

AutoCAD inserts the block and its attributes. The numbers 1, 2, 3, 4, and 5 appear in numerical order from top to bottom. Next, you insert the second block.

22.
From the Insert menu, choose Block. The Insert dialog box opens.

23.
Click on the Block button.

24.
Choose C2 from the Name drop-down list.

25.
Click OK to close the Insert dialog box.

26.
Choose a location on the right side of the screen to insert the block.

27.
When AutoCAD prompts for the first attribute value, type 1 . At each subsequent prompt, type the numbers 2 , 3 , 4 , and 5 , respectively.

AutoCAD inserts the block. Notice this time, however, that the numbers 1, 2, 3, 4, and 5 appear in reverse order, as shown in Figure 9.6. This occurs because you selected the attributes in reverse order when you defined the second block.

Figure 9.6. The effect of the order in which attributes are selected.


Note

The order in which attributes prompt for data is affected by the order in which they are selected when being defined. Therefore, their originally defined order is important when using the ATTREDEF command to redefine blocks with attributes.


Tip

To determine the proper order to select attributes when redefining a block, use the LIST command to list one of the block insertions. When redefining the block, the attributes should be selected in the order in which they appear because this is the order in which they were originally defined.


Finding and Replacing Attributes

AutoCAD 2000 introduced a new tool that allows you to find and replace attribute text values in a drawing. To use this new feature, from the Edit menu, choose Find to display the Find and Replace dialog box shown in Figure 9.7. To locate a text value, enter the value in the Find Text String list box. If you want AutoCAD to replace the found text string with a new one, enter the new text value in the Replace With list box; otherwise leave it blank.

Figure 9.7. The Find and Replace dialog box allows you to locate text values in a drawing.


To specify that AutoCAD should search only block attributes for a listed text value, click the Options button to display the Find and Replace Options dialog box, then clear all options except for Block Attribute Value, as shown in Figure 9.8. From the Find and Replace Options dialog box, you can also tell AutoCAD to match the upper- or lowercase spelling of the search word. Additionally, you can instruct AutoCAD to find the whole word, and not compound words that are partially composed of the search word.

Figure 9.8. The Find and Replace Options dialog box allows searching for text values in block attributes only.


After the find and replace words are indicated, and the options selected, to find the listed word or phrase, click the Find Next button in the Find and Replace dialog box (refer to Figure 9.7). To replace the found word with the listed replacement word or phrase, click the Replace or Replace All button. When AutoCAD finds an occurrence of the listed search word, it displays the listed word, and the phrase in which it’s embedded, in the Context area. When a word is found, you can zoom to its location by clicking the Zoom To button.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.136.90