Categories

AutoCAD 2012 & AutoCAD LT 2012 Bible

The most comprehensive AutoCAD book around!

AutoCAD 2012 Bible

Tutorial: Create attributes

Attributes are tags, or labels, for blocks. You can use attributes to add any text to a block. For example, attributes are often used to fill in the text in a title block.

By placing the attributes where you want them in the title block, you can facilitate the entering of the text. You can also use fields in attributes, to automate some of the text entry.

You can extract the attributes in a drawing to a table or external file. When you do this, you can use the attributes to create a simple database. You could import it into Excel and manipulate it there.

If you’re using attributes to create title block text, you’ll be working in paper space on a layout. If you’re using them to create labels in the rest of your drawing, you’ll be working in model space.

Follow these steps:

Draw the objects that will make up the block. (If you already have a block and want to add attributes to it, you can explode the block, add the attributes, and recreate the block. You can also open the block in the Block Editor, add the attributes there, and save the changes.)

Choose Draw>Block>Define Attributes (ATTDEF command) to open the Attribute Definition dialog box.

In the Mode section, check one or more of the following:

  • Invisible: creates invisible attributes that you can extract, but don’t want to display in the drawing.
  • Constant: Sets a constant value so that you don’t need to fill it in each time. You cannot edit this value.
  • Verify: Prompts you to verify the value, useful when you have a preset.
  • Preset: Inserts a default value, but you can edit it if you set the ATTDIA system variable to 1.
  • Multiple Lines: This is also new for AutoCAD 2008 and not shown above. It allows an attribute to contain multiple lines of text. You can also format attributes in a simplified text editor.

In the Attribute section, specify the Tag, which is like a field/column name for the attribute. For example, enter Cost if the attribute will contain cost information. The tag is converted to uppercase and cannot contain spaces or exclamation points.

Enter a prompt, which is similar to the tag, but can contain spaces.

Enter a value to set a default value. In AutoCAD 2008, this is called the Default. To insert a field, click the Insert Field button.

In the Text Options/Settings section, choose a justification, text style, height, and rotation.

In the Insertion Point section, check the Specify On-Screen check box to specify the location of the attribute. Otherwise, enter the desired coordinates.

Check the Lock Position in Block check box to lock the position of the attribute relative to the block, so that you can’t grip edit it and move it.(In AutoCAD 2008, this option is a check box in the Mode section.)

Click OK. At the prompt, specify the location if prompted.

Choose Make Block on the Draw toolbar (BLOCK command) and use the Block Definition dialog box to create the block. When you select the attributes, separately pick them in the order you want them to appear to prompt you for values. You can choose the Delete option to delete the block and attribute items, because you’ll insert the block later, with its attributes.

When you’re ready to insert the block, you can specify attribute values on the command line or in a dialog box. By default, you specify them on the command line. To use a dialog box, change the value of the ATTDIA system variable to 1.

Use the INSERT command to insert the block. If you set ATTDIA to 1, you then see the Edit Attributes dialog box, where you specify values. Otherwise, you see a prompt on the command line. Any default values that you entered are shown in the text boxes.

Enter the desired values and click OK. The block now shows the attributes (unless you set them to invisible).

Related posts:

  1. AutoCAD tutorial: Extract attributes
  2. Tutorial: Use fields for titleblock text
  3. Dynamic blocks tutorial

9 comments to Tutorial: Create attributes

  • Maritza Sierra

    HOLA: I’m happy to have find your tutorials, and sure that will learn a lot from them
    since I’m a beginner learning on my own and stock on text styles i do not get it right
    just want to change them, following the tutorials on how to get a printed list of all of
    the styles and was not succesfull, text editor box (apply) (set current) the same keep getting
    the same default style. ???????

    THANK YOU
    tati

  • Flori

    thanks to everybody for this discussion, you are very helpful !!

  • MAB

    How can I edit a block attribute title block text with out changing it globally. I am using AutoCad LT 2008. I want to add a letter to the number sheet but it is to big.

  • siddiqali

    hello i am siddiqali
    i want to create a new attribute how can i want do this tell mee detail everthing
    thank you

  • Dustin

    Thank you so much for your tutorial it is great. I had one question while trying to do this. I have created my attributes, and selected them in the correct order when creating the block. The only thing that is missing is when I insert the block it doesn’t automatically pop-up the edit attributes dialog box. If I click on the attributes it will bring it up, but I was under the impression that if I have done it correctly when I insert the block it will automatically bring up the dialog box. I have set my ATTDIA to 1. Any suggestions?

  • Ellen

    When I insert a block with attributes, the prompt comes up automatically. I’m not sure what that wouldn’t happen. Were all the objects that make up the block separate objects (not already in a block) when you created the block that included the attributes?

  • Andrew

    Hi, thanks for the tips and website – very helpful.

    I am trying to make a Title block/proforma for use in a template file. I would like my Title block to work as described above i.e. be prompted to enter attributes (which I can get it to do, no worries)but I also wish that if I copy the layout tab (i.e. to create sheet 2 or more) that when I make changes to the date/revision number etc. on sheet 1 that it changes all the corresponding values on the copied sheets. I normally just use plain blocks within the title block to do this (i.e. any block reference will update if I modify the original). Is this possible for this to happen so that I can have the benefits/ease of entering data using attributes? Or am I going about it all wrong ;)

    Thanks

  • Ellen

    You may want to look at using sheet sets. Look at this tip: http://www.ellenfinkelstein.com/acadblog/autocad-tutorial-create-a-simple-sheet-set/
    You would need to delve deeper into the feature, though. I cover them in my book.

  • jeff

    Hi Ellen I am a pretty experienced cad user
    However I was presented an interesting puzzle
    I need to create a block that allows the user to select
    preset values from a list Ideally i would have a block that
    allowed a user to select from the following:
    approved, approved w/comments, rejected
    then have a “pick list” of initials from the reviewer
    I have toyed with this off and on for sometime mostly
    messing around with dynamic blocks in autocad v.2012.
    never got any satisfactory results. Any ideas?
    thanks!
    Jeff

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>