| < Day Day Up > |
|
AutoCAD provides a pair of nifty tools with which you can edit attributes - the Block Attribute Manager (BAttMan) for editing attribute definitions after the block has been made, as well as the Enhanced Attribute Editor (EAttEdit) for editing attribute values. You'll more likely need to edit values than definitions. However, you might occasionally run into situations in which a definition needs some adjusting.
Figure 19.3.1a
Editing attribute values can be as easy as recalling the Edit Attributes dialog box we used in Exercise 19.2.2. We do this by using the older DDAtte command. The name of the dialog box changes from Enter Attribute to Edit Attribute, but otherwise, it's the same.
AutoCAD does provide a newer, more functional tool, however, that might better serve your needs. With the Enhanced Attribute Editor (Figure 19.3.1a), reached via the EAttEdit command, you can modify the value for each of the attributes of a selected block just as you could with the DDAtte command. Simply select the attribute with the value you wish to modify in the list box and then enter the new value in the Value box.
Figure 19.3.1a
Additionally, the Enhanced Attribute Editor allows you to modify text characteristics as shown in Figure 19.3.1b, and even some attribute properties as shown in Figure 19.3.1c. These improvements over the older DDAtte command justify AutoCAD's efforts toward the new and improved version!
Figure 19.3.1b
Figure 19.3.1c
Changes made via the Enhanced Attribute Editor affect only the value or properties/text options of the selected attribute. In the situation in which multiple instances of the same block occur (as with multiple gate valves in the next exercise), only attributes in the selected block will be modified. (This is also true when using the DDAtte command.) This will become clearer after the exercise.
Note | You can also access the EAttEdit command from the Modify pull-down menu. Follow this path: Modify - Object - Attribute - Single… |
Be sure you're still in the pid-19.dwg file the C:\Steps\Lesson19 folder.
Follow these steps.
TOOLS | COMMAND SEQUENCE | STEPS |
---|---|---|
| Command: v | 1. If the Cont_Station1 isn't current, restore it now. |
No Button Available | Command: ate | 2. When we inserted the gate valves, we assigned a price value of 55.00. According to our chart at the end of our last exercise, the price should be 85.00. Enter the DDAtte command by typing ddatte or ate at the command prompt. |
| 3. Select anywhere on the left gate valve. AutoCAD presents the Edit Attributes dialog box. Change the 55.00 entry to 85.00 as shown. Pick the OK button to complete the command. | |
Edit Attribute Button | Command: eattedit | 4. That was quick and easy; let's try the EAttEdit method. Enter the command at the command prompt or pick the Edit Attribute button on the Modify II toolbar. |
Select a block: | 5. AutoCAD asks you to select a block. Select the other gate valve. AutoCAD presents the Enhanced Attribute Editor. | |
| 6. Select the PRICE attribute and enter a value of 85.00 as shown. | |
| 7. Now select the RATING attribute. | |
| 8. Let's experiment a bit while we're here. Pick the Text Options tab and change the text style to Standard. | |
| 9. Now change the layer to Info on the Properties tab. | |
| 10. Pick the Apply and OK buttons to complete the procedure. Notice the difference in the 150# callout. | |
| Command: qsave | 11. Save the drawing but don't exit. |
It's possible, using an older command line AutoCAD tool, to edit the values and some of the properties of attributes in multiple insertions of a block. The command sequence is:
Command: -attedit (or -ate)
Edit attributes one at a time? [Yes/No] <Y>: [enter]
Enter block name specification <*>: [enter]
Enter attribute tag specification <*>: [enter]
Enter attribute value specification <*>: [enter]
Select Attributes: [select the attributes to change]
Select Attributes: [enter to complete the selection set]
1 attributes selected. [AutoCAD reports how many attributes were selected]
Enter an option [Value/Position/Height/ Angle/Style/Layer/Color/Next] <N>: [tell AutoCAD what you want to do]
The first option - Edit attributes one at a time? - allows you to change attributes globally (several at once) by typing N to override the Y default.
The next three lines ask for some specifics about what you wish to edit. You can simply hit enter at each prompt if you'll edit the attributes individually. The default is to accept all selected attributes for possible editing. But you can use these prompts to act as filters in a global selection set. For example, you can edit just the gate valves in our PID-19 drawing by responding gate to the Enter block name specification prompt.
After you select the attributes to edit, AutoCAD presents a line of options to help specify what type of editing to perform.
The Value option allows you to change the value of the attribute. Use this if you need to globally change a value. For example, assume the price of 4" globe valves has just changed. You could edit your drawing globally to change the value of the Price attribute for all 4" globe valves. It's easier to use the DDAtte or EAttEdit command to change individual values.
The Position option comes in quite handy when the value of an attribute is physically too large to fit in the area allotted for it (it overlaps something else). The Move command will move the entire block, but the Position option of the Attedit command (command line method) allows you to move just a single attribute.
The Angle option is also quite handy for making attributes read properly despite the insertion rotation of the block.
The other options - Height, Style, Layer, and Color - allow you to edit these properties of attributes. If it's necessary to change any of these, however, it may be better to redefine the block(s) so that it inserts properly in the first place.
Note | An easy way to see the values of all the attributes attached to a block is to set the Attdisp system variable to On. The command sequence looks like this: Command: attdisp Enter attribute visibility setting [Normal/ ON/OFF] <Normal>: on It can be useful to display all the attributes when searching for errors, but the display can quickly become quite crowded.
|
Let's try multiple attribute editing.
Be sure you're still in the pid-19.dwg file the C:\Steps\Lesson19 folder.
Be sure the Cont_Station1 view is still current.
Follow these steps.
TOOLS | COMMAND SEQUENCE | STEPS |
---|---|---|
No Button Available | Command: -ate | 1. Our project engineer has determined that this control station requires a higher rating for the block and bypass valves. Enter the -Attedit command by typing -attedit or -ate at the command prompt. |
Edit attributes one at a time? [Yes/No] <Y>: n Performing global editing of attribute values. | 2. We want to edit all the 150# valves. Tell AutoCAD that you don't want to Edit attributes one at a time. AutoCAD responds that this will be a global edit. | |
Edit only attributes visible on screen? [Yes/No] <Y>: [enter] | 3. We'll want only the valves on the screen to be affected by this editing. | |
Enter block name specification <*>: [enter] | 4. We'll be editing more than one type of block, so leave this default at the global setting. | |
Enter attribute tag specification <*>: rating | 5. We want to edit only the Rating attributes. If we tell AutoCAD this, it won't change any other type of attribute. | |
Enter attribute value specification <*>: [enter] | 6. We don't need any further filtering for our edit. | |
Select Attributes: Select Attributes: [enter] | 7. Select the three 150# attributes showing on the screen, and then confirm the selection. | |
Enter string to change: 150# | 8. AutoCAD wants to know what to change … | |
Enter new string: 300# | 9. … and what to make it. Your drawing looks like Figure 19.3.1.2.9a. | |
| ||
| Command: qsave | 10. Save the drawing but don't exit. |
Command: -ate | 11. Notice that the 3" attribute valve slightly overlaps the control valve stem. Let's move it over a bit. Repeat the -Attedit command. | |
Edit attributes one at a time? [Yes/No] <Y>: [enter] Enter block name specification <*>: [enter] Enter attribute tag specification <*>: [enter] Enter attribute value specification <*>: [enter] | 12. This time, we can speed through the first four options by simply accepting the defaults. | |
Select Attributes: Select Attributes: [enter] | 13. Select the 3" attribute value and then confirm the selection. | |
| 1 attributes selected. Enter an option [Value/Position/Height/ Angle/Style/Layer/Color/Next] <N>: p | 14. AutoCAD reports the number of the selected attributes and then asks what you want to do. Tell it to edit the Position of the attribute. |
Specify new text insertion point <no change>: | 15. AutoCAD grabs the attribute at its insertion point and asks where you want to put it. Position it so that it doesn't touch the valve or the valve stem. (This may take a few tries to get it located properly.) | |
Specify new text insertion point <no change>:1Enter an option [Value/Position/Height/ Angle/Style/Layer/Color/Next] <N>: [enter] | 16. Hit enter to conclude the command. The valve looks something like Figure 19.3.1.2.16a. | |
| ||
Command: -ate | 17. Reposition the remaining attributes to clarify this area. The drawing will look like Figure 19.3.1.2.17a when you've finished. | |
| ||
| Command: qsave | 18. Save the drawing. |
Let's take a look at how we can edit an attribute's definition after creating the block.
With the Block Attribute Manager (Figure 19.3.2a), AutoCAD has made editing attribute properties after block creation almost easier than editing them before you make the block! Access the manager with the BAttMan command, but exercise some caution when editing block properties. Remember that modifications may affect all insertions of the block (current and future).
Figure 19.3.2a
Let's take a look.
You'll probably notice the large list box first. Here AutoCAD lists the various attributes associated with the block shown in the Block control box above it. You can select another block from the control box, or you can use the Select block button to select a block from the drawing. The button is handy when you don't know the name of a particular block that needs editing.
For its size, this dialog box contains quite a few buttons.
Use the Sync button to update all insertions of the selected block with the currently defined attribute definitions. AutoCAD does this automatically when you edit but provides this manual procedure for those who prefer it.
AutoCAD lists the attributes in the text box in the order in which it prompts for values (when you insert the block). Use the Move Up and Move Down buttons to change the order of the prompts.
Use the Remove button to remove an attribute from a block definition. Be careful with this one. By default, AutoCAD will remove the attribute definition and values from all the insertions in the drawing; you may lose some information.
The Apply button (along the bottom of the box) applies your changes but leaves the dialog box open.
The OK button also applies your changes but closes the dialog box.
Cancel closes the dialog box without saving your changes.
Help calls the Help dialog box.
The two buttons we omitted - Edit… and Settings… - each call additional dialog boxes.
The Edit button calls the Edit Attribute dialog box (Figure 19.3.2b). Its three tabs provide access to the attribute definitions.
Figure 19.3.2b
The Attribute tab (shown) allows you to change the Mode, Tag, Prompt, and Default settings.
The Text Options tab (Figure 19.3.2c) allows you to change the Text Style, Justification, Height, Rotation, Width Factor, and Oblique Angle.
Figure 19.3.2c
The Properties tab (Figure 19.3.2d) allows you to change the Layer, Linetype, Color, Lineweight, and Plot style.
Figure 19.3.2d
Note | The bottom of the Edit Attributes dialog box contains a simple check box that might save you some time and grief. Put a check next to Auto preview changes and you can see the changes take place on your screen as you make them. This nifty tool enables you to catch errors before locking yourself into them. |
The Settings… button (back on the Block Attribute Manager) calls the Settings dialog box (Figure 19.3.2e). Here you can tell AutoCAD exactly what (and what not) to show in the Block Attribute Manager (how nice to be able to tell Batman [sic] what to do!)
Figure 19.3.2e
Use the check boxes in the Display in list frame to customize the list box of the Block Attribute Manager. A check next to an item tells AutoCAD to display that information in BAttMan's list box; a clear check box tells auto cad not to display it. When too many items are checked for AutoCAD to display them all, a scroll bar will appear in the bottom of the list box to allow you to see everything.
Use the Emphasize duplicate tags check box to have AutoCAD let you know if a block has attributes with duplicate tags in it. AutoCAD will highlight the duplications where they occur. When that happens, you might want to change one of the tags for clarity.
The purpose of Apply changes to existing references might seem a bit confusing, but understanding its use is quite important. A check next to this tool means that AutoCAD will update all current insertions of the block with the modifications you're making. Clear this box and AutoCAD will use the modifications for any new insertions but won't update existing blocks.
Let's see what BAttMan can do!
Open the pid-19-done.dwg file the C:\Steps\Lesson19 folder.
Follow these steps.
TOOLS | COMMAND SEQUENCE | STEPS |
---|---|---|
| Command: v | 1. Restore the I_O_LEFT view. Your drawing looks like Figure 19.3.2.1.1a. We'll work with the upper arrow-looking polygon. Notice that the text style differs from similar blocks. Notice also that there appears to be an extra attribute below the blocks. This type of situation might occur when you import a block from another drawing. We'll adjust this block to reflect styles and standards from our drawing. |
| ||
Block Attribute Manager Button | Command: battman | 2. Open the Block Attribute Manager by entering battman at the command prompt. Alternately, you can pick the Block Attribute Manager button on the Modify II toolbar. |
Select Block Button | 3. On the Block Attribute Manager, pick the Select block button. | |
Select a block: | 4. AutoCAD returns you to the graphics screen and prompts you to select a block. Select the upper block with the text that reads 100-CWR-D-1001. | |
| 5. Select the TEXT attribute. | |
| 6. Pick the Edit… button. | |
| 7. AutoCAD presents the Edit Attribute dialog box (Figure 19.3.2b). Pick the Text Options tab. | |
| 8. On the Text Options tab, change the Text Style to TIMES. | |
| 9. Go to the Properties tab. | |
| 10. Notice that the attribute was placed on the txt layer rather than the TEXT layer that is standard on this drawing. Change it to the proper layer. (If there is a check next to Auto Preview Changes, you can already see your changes.) | |
| 11. Pick the OK button to return to the Block Attribute Manager. | |
| 12. Now let's do something about that extra attribute. Select the Supplementary attribute in the list box and then pick the Edit… button. | |
| 13. Just in case we need this attribute in the future, we'll put it on the proper layer. Repeat Step 10. | |
| 14. Return to the Attribute tab. | |
| 15. Rather than delete the extra attribute (there's always a chance we might need it later), we'll simply make it invisible. Place a check in the proper Mode box. | |
| 16. Pick the OK button to return to the Block Attribute Manager. | |
| 17. Pick the Apply button to apply your changes to all the insertions of the OFF- DRAWING-LEFT block. | |
| 18. Pick the OK button to complete the procedure. | |
| Command: qsave | 19. Save the drawing. |
| < Day Day Up > |
|