Академический Документы
Профессиональный Документы
Культура Документы
ATTRIBUTED BLOCKS
Definition
An attribute is a text item that is attached to a block definition. Attributes expand the
definition of a block to include text information that you provide.
Concepts
When you define an attribute, you specify its features, such as an identifier, an initial
value, its appearance, its location relative to the associated block, and other
properties.
An attribute becomes part of a block definition.
When you insert an attributed block into a drawing, the attributes are also inserted.
An attributes value can be the same or different for each insertion of the block,
depending on how you have defined the attribute.
A block can have multiple attributes.
AutoCAD provides a set of commands for working with attributes.
CREATING AN ATTRIBUTED BLOCK
1. Draw the geometry (if any) that comprises the block.
2. Invoke the ATTDEF command to create and place an attribute (see below). Repeat
this step once for each attribute you wish to associate with the block.
3. Invoke the BLOCK command to convert the geometry and attributes to a named
block. When prompted, select the geometry, then the attributes in the order you want
their prompts to appear when you insert the block.
ATTDEF
You invoke the ATTDEF command to define an attribute. This command lets you specify
not only the attribute text, but also numerous related features: its position relative to the
block geometry, the text style, justification, height, rotation, an initial value, and so on.
ATTDEF prompts you for information via a dialog (see Figure 1); invoke the -ATTDEF
command to be prompted on the Command line for the same information.
Command line:
Pulldown:
Toolbar:
Insert field
button
An identifier for the attribute. The tag cannot contain spaces. You can
enter the tag in lowercase, but AutoCAD converts it to uppercase. The
tag appears in your drawing until you make the block. When you insert
an attributed block, the tags are replaced by the values you supply.
Prompt
The text that appears during block insertion that asks you to enter the
value for the attribute.
Value
An initial value for the attribute. Depending on other attribute settings,
you may be able to change the value when you insert the block.
Insert field
This button (see Figure 1) displays the Field dialog box. You can insert a
field as all or part of the value for an attribute. See Defining Fields as
Attributes in the next section.
Insertion Point The location of the attribute. In the ATTDEF dialog, you can specify an
insertion point for the attribute by entering coordinates in the X, Y, and
Z boxes, or you can check the Specify On-screen button to select an
insertion point on the screen after you close the dialog box.
Justification
Any of the typical text justification methods. Refer to the AutoCAD
online help for more information about choices for text justification.
Text Style
A text style for the attribute. The style must already be defined in the
drawing.
Height
The size of the attribute text. You can enter the text height in the box, or
you can pick on the Height < button and specify the height by picking
two points on the screen. AutoCAD calculates the distance between the
two points you pick and supplies that value for the text height.
Rotation
The rotation angle of the attribute text. You can enter the rotation angle
in the box, or you can pick on the Rotation < button and specify the
rotation angle by picking two points on the screen. AutoCAD calculates
the rotation angle of an imaginary line between the two points you pick.
Tag
Mode
Invisible
Constant
Verify
Preset
Align below
Lock position
If you want to change any property of an attribute, it is easy to do so before you define
the block. Simply select the attribute and make the modification in the Properties
window. After the attribute has been turned into a block, you must invoke a block editing
command (see below) to modify attribute properties.
After you have defined all the attributes for a block, invoke the BLOCK command, select
all block geometry and attributes, and proceed as you normally would to define a block.
INSERTING ATTRIBUTED BLOCKS
You invoke the INSERT command to insert an attributed block. The Insert dialog box
appears (see Figure 2).
Command line:
Pulldown:
Toolbar:
INSERT (or I)
Insert Block
Draw
In addition to providing an insertion point, scale factors, and rotation angle, you are also
prompted to supply values for all the blocks attributes that are not constant or preset.
Several system variables and command settings affect the prompting and visibility. To set a
system variable, enter its name at the Command prompt and then enter the desired value.
ATTDIA is
0
a system variable that controls how you are prompted for attribute values.
(default) You are prompted
for attribute values on the
command line (see Figure 3).
is a system variable that controls whether you are prompted for attribute values
while you are inserting a block.
0
You are not prompted for attribute values. If you supplied an initial value when you
defined the attribute, that value is supplied automatically.
1
(default) You are prompted for attribute values, either on the command line or in
the Enter Attributes dialog, as specified by ATTDIA.
ATTREQ
MIRRTEXT is
a command that controls the display of attributes. You can also invoke this
command by selecting View Display Attribute Display from the pulldown menu. This
setting affects plotted drawings.
Normal (default) Turns off invisible attributes, and leaves all others on.
Off
Turns all attributes off, no matter how they were defined.
On
Turns all attributes on, no matter how they were defined.
When you insert an attributed block, the tags are replaced by the values you supply.
Figure 5 shows a sample attributed title block.
ATTEDIT
Command line:
Pulldown:
Toolbar:
ATTEDIT
Modify Object Attribute Single
none
The ATTEDIT command invokes the Edit Attributes dialog (see Figure 6), where you can
modify attribute values assigned to a selected block. To edit attributes for more than one
block in a drawing, first invoke the MULTIPLE command at the Command prompt and
specify the ATTEDIT command. You are prompted to select blocks for editing until you
press Esc to terminate the command.
ENHANCED ATTRIBUTE EDITOR (EATTEDIT)
AutoCAD provides a more powerful version of the ATTEDIT command that lets you
modify any attribute property for a single block at a time. Double-click on an inserted
block or invoke the EATTEDIT command and select a block to display the Enhanced
Attribute Editor dialog box.
On the Attribute tab, shown
in Figure 7a, you can select
an attribute tag and modify
the Value assigned to the
attribute.
Click on the Select block button in the upper right corner of the dialog to select a different
block and modify its attributes without closing the dialog box.
-ATTEDIT
Command line:
Pulldown:
Toolbar:
-ATTEDIT
Modify Object Attribute Global
none
The ATTEDIT command lets you change either attribute values for multiple blocks or
other attribute properties one attribute at a time. Though somewhat difficult to use, this
command performs a function that no other attribute editing command can do as well: repositioning an invisible attribute without re-defining a block.
Depending on how you answer the first prompt, the -ATTEDIT command lets you edit
only attribute values or any attribute property. -ATTEDITs first prompt asks if you want
to edit attributes one at a time. If you respond No, you enter Global Editing mode, which
lets you edit only attribute values, either for all attributes or only those visible on the
screen. If you answer Yes, you enter Individual Editing mode, which lets you edit the
value or other attribute properties for one or more blocks.
The next series of prompts creates a selection set of attributes to be edited. You can filter
the selection set by specifying a block name, an attribute tag, and/or an attribute value.
The default value for each of these prompts is the * wildcard, which performs no
filtering. Press Enter at each of these prompts to reach a prompt where you can pick
attributes for editing.
At the Select Attributes prompt, select the attributes you wish to edit. If you select
more than one attribute, AutoCAD steps through the group one at a time, marking the
current attribute with . You can modify the Value, Position, Height, Angle, Style,
Layer, or Color of an attribute.
Choose Position to move an attribute. The attribute value is attached to the
crosshairs. Select a new position for the attribute.
You have two options for an attributes Value:
o Change lets you modify characters within a value.
o Replace lets you specify an entirely new value.
When you are finished modifying the current attribute, enter N (for Next) at the command
options list to move the to the next attribute in the selection set.
EXPLODING ATTRIBUTED BLOCKS
If you explode an attributed block, it
reverts to its pre-block appearance (see
Figure 8). The values assigned to the
attributes are replaced by the attribute
tags. The block appears as it did before
being turned into a block. You should
rarely need to explode an attributed
block.
Figure 8. An exploded attributed block