Defining a series of attributes with different modes
Video: Defining a series of attributes with different modesYou can create attributes to store any type of text or numerical data that you want to attach to blocks. By storing these types of information, attributes allow you to manage non-graphical data in your drawings. In this lesson, you'll define a series of attributes to hold specific pieces of data using a variety of modes, which determine whether the attributes are visible or invisible, constant, preset, or require user verification. Open the Office 3 project file and click the Insert Tab on the ribbon.
Viewers: in countries Watching now:
In this workshop, AutoCAD expert and author Scott Onstott teaches you how to build intelligence into drawing objects so that the symbols used in your drawings carry meaning beyond simple geometric representations. Learn how to embed manufacturer, model, and pricing data into commonly used blocks; create invisible attributes that embed data in geometry without it appearing in the drawing area; and use field codes to display information from the AutoCAD database inside text objects. Plus, discover how to format, edit, and extract attribute data for use in external spreadsheets and/or for display within tables in AutoCAD drawings.
- Why data management is important in AutoCAD
- Designing attributes and storing attribute data
- Using fields to display object properties
- Extracting data from AutoCAD send to Microsoft Excel
- Creating tables
- Formatting table cells and styles
- Editing table cells and using formulas
Defining a series of attributes with different modes
You can create attributes to store any type of text or numerical data that you want to attach to blocks. By storing these types of information, attributes allow you to manage non-graphical data in your drawings. In this lesson, you'll define a series of attributes to hold specific pieces of data using a variety of modes, which determine whether the attributes are visible or invisible, constant, preset, or require user verification. Open the Office 3 project file and click the Insert Tab on the ribbon.
In the Block Definition panel, click Define Attributes. I'll drag this dialog box out of the way. And let's first define an attribute that stores the employee's last name, and it will go inside this rectangle down here. Every attribute has to have a tag and a prompt. The tag is the programming name, and it must appear in all capital letters with no spaces. So, in this case, I'll type LName.
The prompt describes what we're asking for. So, I'll type employee's last name. The default value is optional. In this case, I will leave it black because everyone will likely have a different last name. Justification will be centered here in the middle of this rectangle, so let's select middle center. We will use the attributes text style, and specify the insertion point on screen.
Okay, zoom in here. Make sure object snap tracking is on, and midpoint object snap is running. Position the mouse over this midpoint and move it up to get a vertical tracking line. Then position the mouse over this midpoint and move it back horizontally until you see the intersection point of the tracking lines appear. Then click and you've completed the process.
You've created an attribute definition. Let's make another one up here, to store the room number. Click define Attributes, an type the tag name, room N O. Press the Tab key to move to the next text box, and type room number. This time, let's enter a default value of 100.
The text should be justified, so that it will fit here and let's go ahead and chose Middle Left. Click OK and track both midpoints to where they intersect. Now, we need to move this over. Type M, Enter, select the attribute definition, click some arbitrary point, and then turn on Ortho, so you can slide it horizontally.
Click a point about here to slide it over. Now, it doesn't matter that the tag name spills out of the rectangle, because ultimately this attribute will display the value of three digits, and it should fit perfectly inside this rectangle. Let's zoom out, and design some more attributes, this time for this piece of furniture. Click Define Attributes, and type price in all caps for the tag name.
Press Tab, and type that in title case. The default value will be $1,000, but we won't use the dollar symbol we'll just use a number. Justification can remain left, but this attribute should be invisible, so check that mode. It's also an important attribute, so lets ask to verify that attribute value. Click OK, and then place it right next to the chair. Press Enter to create another attribute.
This time, type MANUF, press Tab, and then type Manufacturer. The default value, in this case, let's say that this project is going to be purchase most of the furniture from this hypothetical company called FurnCo. This time I will choose to align below the previous attribute definition, so that I don't have to pick its location onscreen.
I want this to be an invisible attribute, but I don't want to verify it. Instead, I want this to be a preset attribute, so that we won't be prompted on the command line for this particular piece of data. I'll click OK, and it's created. Press Enter again, and type model as the tag name, and then model as the prompt as well. Let's say that this particular armchair has a certain model number, which I'm just going to make up. Let's call it A321, and because this is going to remain the same, I'm going to deselect Preset and check Constant.
It will also be invisible and it will align below the previous attribute definition. Okay, now I'd like these three pieces of data to go with every piece of furniture that I have in this project. So, I'll go ahead and copy by typing CO Enter. I'll copy these three attribute definitions, and I'll turn off Ortho, and just copy these down here for the desk and for these two chairs as well.
Now, that saved us a lot of time from creating these all over again, but let's say that the model numbers are going to be different. I'll double-click on model to Edit this attribute definition and let's change the default value, I'll call this D444. Okay, and down here, we're going to have this chair have a default model number of C456.
Okay, this one should be the same, so let's go ahead and edit that as well, that'll be C456. Okay, in this lesson, you created five separate attribute definitions to store specific pieces of data relevant to the sample project. You also copied attribute definitions onto each piece of furniture in preparation for their inclusion in block definitions.
There are currently no FAQs about Data Management with AutoCAD 2013.