Making attributes

In this example, I will make attributes for the cubicle number. We will make the rectangle first. For this example, I will make a rectangle with a length of 10 units and a width of 5 units. After we have a rectangle, we can start making the attribute:

  1. Click the define attributes option in the expanded Block panel of the Home tab, shown in the following screenshot, or use its command alias, ATTDEF:

Figure 4.71: The define attributes option in the Block panel 
  1. The Attribute Definition window, shown in the following screenshot, will open with lots of options. From the Mode panel of this window, select Lock position and uncheck all the other options. We will talk about the other options in the Mode panel later in this chapter:

Figure 4.72: Attribute modes in the Attribute Definition window 
  1. In the Attribute panel on the top-right side, add the following values. In the Tag field, type CNUM (short for cubicle number). You can also type any other tag here— note that the space character is not allowed here.
  2. In the Prompt field, type Enter cubicle number and in the Default section, you can type a default value or leave this field blank. In our example, I am leaving it blank.
  3. In the Text Settings section, you can add the following values. For Justification, select Middle center. This will ensure your text always starts from the middle center of the rectangle. You can select any other justification value if you want to.
  1. For Text style, select the style you have defined for the attribute; in this case, we have not defined any text style. In fact, we will learn about text style later in this chapter so I will leave this one as its default option, which is STANDARD.
  2. Keep the Annotative checkbox unchecked and add the height for the text that you want. I am using a text height of 1 unit; the unit can be any unit that you have selected for the example.
  3. Leave the rotation angle at 0 degrees and click OK to accept these settings. My final Attribute Definition window looks like this:

Figure 4.73: The Attribute Definition window after adding all the values in their respective fields 
  1. Now, the CNUM tag will show up on your cursor. Click on the geometric center of the rectangle and the final drawing will look like this:

Figure 4.74: A rectangle with the CNUM attribute at the geometric center 

Now, we have a rectangle as well as the attribute text. It's time to convert these things into a block, and we will do just that in the following example:

  1. Start the block command using the Create option in the Block panel or using its command alias, B.
  2. In the block's window, add a name for this block. I am using Cubicle Tag.
  3. Now, select the base point, the rectangle, and the attribute for the cubicle block. After making these settings, my Block Definition window looks like this:

Figure 4.75: Options in the Block Definition window for converting the rectangle and attribute into a block 
  1. Click OK and the Cubicle Tag block will be created. As soon as you finish the block, the Edit Attributes window will open with the fields shown in the following screenshot:

Figure 4.76: The Edit Attributes window with the Enter cubicle number field highlighted 
  1. In this window, the name of the block will show up at the top and you can see the prompt we used to create the attribute in the first field enclosed in the red box. Type any value in the first field and click OK to enter the block with that value.

We now have our first block, which contains an attribute that can be changed every time a new block reference is added. To add more block references, select the Cubicle Tag block from the Insert option in the Block panel. As soon as you insert a block in the drawing area, it will open the Edit Attributes window, where you can add the cubicle number and click OK to add a different cubicle number for every single block reference.

If you don't see the Edit Attributes window when inserting a block containing an attribute, you will see a similar prompt in the command line and you can directly type the attribute values in the command line:

Figure 4.77: The edit attributes prompt in the command line
 The display of the Edit Attributes window is controlled by an ATTDIA system variable. When the value of the ATTDIA system variable is set to 1, then the Edit Attributes window will show up and if this value is 0, then the prompt will appear in the command line.

If you want to modify the attribute value of the existing block, then double-click on the block and change the attribute from the Value field of the Enhanced Attribute Editor and click OK, as shown:

Figure 4.78: The Value field in the Enhanced Attribute Editor window 

You can also change the formatting of an attribute using the Text Options and Properties tabs of the Enhanced Attribute Editor window. Some of the prominent properties you can change here are the color, justification, and text width.

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

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