Blocks are typically symbols; a collection of geometry for one purpose or another. Block Attributes are text that can easily be updated when a block is inserted. The text may refer to the model number of a part, a person’s name, or any number of details. The number of attributes present in a block are virtually limitless. You may even decide to create an entire drawing format that includes dozens of attributes representing title block information.

draftsight

For an example, we will use a simplified representation of a title block area in the image. First, we will need to create the basic block geometry. Next, let’s walk through how a Block Attribute can be added.

Click the Draw menu -> Block -> Define Block Attributes. This will open the Block Attribute Definition window, shown on the right in the same image.

There are three areas we will focus on:

Name, Caption, and Default Value.

Let’s discuss what these items represent:

1. Name: Every block attribute must have a Name. It is what differentiates block attributes from one another. The Name is also what is seen on screen prior to the block attribute text being incorporated into the block.

2. Caption: When the block is inserted into the drawing, the Caption is what appears in the dialog box. It is often used primarily as a prompt, notifying the user as to what type of data should be entered.

3. Default value: When the block is inserted, this is what the text will display. In other words, it is what will be shown in the drawing. The Default Value can be changed during the insertion process.

In the example above, the Name is “Author”, the Caption is “What is your name?”, and the Default Value is “Dave”. If we click OK, we can then place the text at the desired position. The next image shows our sample title block area with the new block attribute added to it. Block attributes named Title and Location have also been added. Considering we have not yet defined the block, the block attribute text displays it’s name, rather than it’s default value.

draftsight

Block Attributes do not have to contain static text. They can contain fields that dynamically update. For instance, the previous image shows the date being added to a new block attribute as the Default Value. Likewise, the Title attribute has previously been set to display the document name, whatever that may be. To use fields in your block attributes, use the small button to the right of the Default Value box.

Now we get to the interesting part. We need to define the geometry and text as a block.

Click Draw -> Block -> Define and create the block as you normally would.

Make sure to select all the geometry and text. Once the block has been defined, the text will change to display the Default Values, instead of the names of the block attributes. If you insert the block again into the drawing, the command line will prompt you for information using whatever was entered for the caption.

draftsight

Once the block has been inserted, the block attribute values can be edited using the command EditBlockAttribute. This will bring up the window shown in the previous image. Of particular interest is the Caption column.

If you took the time to add good captions, you will know exactly what type of data to enter for the values. Furthermore, values that are gray are linked to fields. Field data will update automatically, so it is usually best to leave it alone. You can override the data by entering whatever you want, but that will break the link and the field will no longer update automatically.

Have fun exploring new ways to take advantage of block attributes and make your blocks more useful, and Happy Modeling!


Tags: ,