Categories

AutoCAD 2015 and AutoCAD LT 2015 Bible

The most comprehensive AutoCAD book around!

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.

Start the ATTDEF command

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 Home tab>Block panel (expanded)>Define Attributes (ATTDEF command) to open the Attribute Definition dialog box.

autocad-tips-acadtips_create_attribute-2

Configure the Mode section

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: Allows an attribute to contain multiple lines of text. You can also format attributes in a simplified text editor.

Check the Lock Position check box to lock the position of the attribute relative to the block, so that you can’t grip edit it and move it.

Configure the Attribute section

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.

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

Check out this free dynamic block tutorial

Plus get free tips in our AutoCAD Tips Newsletter!

Dynamic Block TutorialGet a free tutorial on creating a complete dynamic block, including a drawing to practice on. You'll make a movable chair, resizable desk, and more. PLUS, the highly-acclaimed AutoCAD Tips Newsletter will keep your skills up to date!

Make the block

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. For instructions on making a block, see “Making a block in AutoCAD.”

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

Insert the block

Use the INSERT command to insert the block. For instructions, see “Insert a block in AutoCAD.” 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).

Draw and edit faster and easier with these top 25 productivity tips every AutoCAD user should know. Check out “Top Productivity Tips Every AutoCAD User Should Know” at http://www.ellenhelps.me/25-Productivity-Tips

Ellen Finkelstein

51 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: https://allaboutcad.com/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

  • Mansoor

    can i type att text in two line(like multiText)

  • Ellen

    In the Attribute Definition dialog box, there’s a Multiple Lines checkbox that lets an attribute contain multiple lines.

  • Gavin

    Hi Ellen, I am trying to create an electrical terminal block (wire, teminal, PLC I/O number are all related), and I want to reuse an attribute multiple times within the block with different prefix or suffix notation to represent the various required fields. I can see the style of notation required with fields but I not with attributes. is this possible?

    Regards
    Gavin

  • Ellen

    I’m not sure what style of notation you need. Would just copying the attributes work?

  • Gavin

    If an attribute is copied then you have two attributes with the same tag, (the attribute manager shows then in red as an error) but they are independent and each needs to be entered individually.

    Essentially I would like to use the attribute like a field where I can concatenate attributes and strings together, and possibly even do simple math on an attribute value.

    As it stands I need to enter multiple attributes all based around the same number (or an offset of that number)for each PLC input or output.
    The PLC Tagname “DI.”
    The Upper Terminal number “X1-U”
    The Lower Terminal number “X1-L”
    The PLC Tag Address “%I..”

    if I only needed to enter the PLC Rack, Card and Input number then much of the repetition would be removed and errors could be avoided.

    I do not know if what I am trying to do is possible in Autocad, but i see similar capabilities in field, so I am hopefull.

    regards
    Gavin Carter

  • Andreijj

    Hi Ellen!

    Can i define attributes only blocks? Actually, i would like closed lines (like premises), which have some attributes. I use autocad map3d2011.

    Thank you!

  • Ellen

    Attributes are only for blocks. But there’s a feature to let you display properties of non-blocks, called Data Extraction.
    See this tip for a tutorial: https://allaboutcad.com/extract-data-from-objects-in-autocad-2008-and-later/

  • Noufal Calicut

    thanks a lot…….

  • PAULA

    I’M CREATING ATTRIBUTES FOR MY TITLE BLOCK. WHEN I CREATE FOR EXAMPLE “SHEET NUMBER” ATTRIBUTE, I CANNOT SEPARATE THE TWO WORDS, IT SHOWS ON MY TITLE BLOCK AS “SHEETNUMBER”. SHOULD I CREATE ONE ATTIBUTE FOR ‘SHEET” AND ONE ATTRIBUTE FOR “NUMBER”?

    THANKS,
    PAULA

  • PAULA

    ALSO, IS IT POSSIBLE TO ALIGN THE TEXT ATTRIBUTES?

  • Ellen

    I’m not sure about your 1st question. About this one, when you create the 2nd attribute, there’s a checkbox in the dialog box that aligns the 2nd one under the 1st.

  • PAULA

    Thanks Ellen! As far as my first question, how can I create a text attribute that contains two words that must be separated?

  • peter

    I have exactly the same question as Jeff. I need to make a block with an attribute that has a preset list of values.till now I’ve been using the visibility parameter and it works. The only problem is when I want to add a new value to the list. Is there any way to do this using the lookup parameter?

    Thanks

  • Julia

    Hi!
    First off, love your tutorials! I was thrown into AutoCAD at work without any instructions, so I really appreciate these 😀

    Second, my actual question! I was taught CAD on Microstation, so I am used to just creating text fields that I can fill in later, no definitions needed. If I wanted to insert a blank field for someone to fill in with an appropriate value later (i.e. “IN_” where they’d put a number in the field), is that possible to do in AutoCAD? I’d like it to literarlly look like “IN_”, and all the field options I’ve seen won’t let me personally define the field name. There isn’t a set data set for the field, so I won’t be using an excel sheet to populate the fields.

    I’m a pretty big novice when it comes to stuff like this, so let me know if anything I asked needs clarifying. Thanks!

  • Melyn

    I cannot type text height in the Attribute Definition Box now, although was able to do that in a previous project. Can you tell me what to check or what might be going wrong?

  • april

    I have created a block with several attributes. I forgot to make 2 of them invisible. I can’t for the life of me figure out how to edit this.

  • I read and tried to make block, so I made it correctly, it was so nice…….really helpful info. thnx a lot

  • Johan

    I’ve created a block with attributes and for safety reasons I’ve deselected the allow exploding option, but to my surprise all the grips of the attributes of this block also disappeared which is not very handy. To move an attribute for an individual case it is only possible with the original “-attedit” command.
    Is it possible to turn the grips on for the attributes for these types of blocks?

    Friendly Regards,
    Johan Seinen

  • yoni

    Hello

    Is it possible to add a default letter to an attribute.
    I have an attribute where I have to enter several valuenumbers. behind several of these values there have to stand different abbreviations (MW, P, rpm, V, A, mA, ….). So is it possible to add these abbreviations, so that I just have to enter my numbers and that the abbreviation automaticly shows up.
    Now I always enter the number and the abbreviation, but it will save me a lot of time if I just have to enter the number.

    Kind regards

    Yoni

  • Anwar

    Hi Ellen Can I add more tags to an already created attributes??

  • Koen

    Hi Ellen,

    I have made a quite complicated dynamic block (26 invisibility parameters and 81 block attributes), now I have to create a translate this block, but therefor I only have to change 5 attributes. Is there a way to copy the block defenition and assign a new name without losing the parameters?

  • Bart

    Koen,

    Try this:
    *Copy the block to a new (empty)drawing
    *use REN command to rename the block
    *apply your changes
    *copy-paste back to the old drawing

    Now you have two very similar blocks in the old drawing. Hope this helps!

  • Marcelo

    Hi!
    I have two questions:
    1- Is it possible to have multiple instances of the same attribute inside one block? For example, if I have two visibility states and I want one attribute to appear in different positions on each one of them.
    2- Is there a way to flip attributes so they remain always horizontal? I tried to apply two flip actions to an attribute (one horizontal and one vertical). The vertical works fine – only the position of the text is flipped, but the horizontal flips the position as well as the text orientation… is there another way to do this?
    Thanks!!!

  • mohamed

    hi.first i want to thank you for all nice efforts . and i hope you increasing successfully.
    then i want to ask about attribute how can i make drawing title to reading in layout from drawing title in folder ?

  • TARA

    I am working with attribute within a dynamic block. In the dynamic view I have the attributes turned on, all of them are on except two. i can’t figure out why they wont turn, they are showing that they are on in the block editor. I used sync, but still will not show up. any ideas?

  • Mike P.

    Tara,

    In the block editor, check the properties on the missing attribute definitions to make sure the “Invisible” flag is set to “No”.

    Otherwise, are you being prompted to fill in the missing attributes when you insert the block or do they show up when you use the Enhanced Attribute Editor?

    You mention “sync” in your post. I assume you mean the command ATTSYNC (attribute sync). If not, try ATTSYNC which should synchronize the attributes of any existing instances of this block to match the attribute definitions of the current block definition.

  • Swapan Kumar

    I finish attributes block in title block in autocad 2010 but when I open this file in autocad 2012 that time not showing attributes text so please solve and send me how to showing this attributes file? Mail Id swapankd@yahoo.in

  • Karl

    How do you rotate a block with attributes & have the attributes’ orientation remain upright? In the block editor there is ‘Match layout orientation’ but that’s for the whole block itself & there doesn’t seem to be anything like that for the attributes.

  • Sartaj

    Hi all.
    this tutorial helps me a lot. I understood how to create attributes. But I have one doubt.
    What is the main purpose of creating attribute? Please explain me about the purpose of attribute and defining block.

  • it business analyst

    Good post. I’m experiencing a few of these issues as well..

  • debasish mandal

    How I select the proper justification for text

  • brenda

    Hi, I need to change the default values on block so that they are all derived from the middle value, say;
    101 100 99
    1 mid -1
    -99 -100 -101
    Thx

  • srikanth gandla

    HOW TO CREATE Atribuete in my drawing please

  • HI!
    Very good topic of making attributes. I have tried to find a method for making a text line thats automayicly copiyng the text. example: if i write E 510-0 it will automaticly make same text in the corner of my paper.

    how do i make it??

  • Ellen Finkelstein

    Perhaps with a script and/or by creating a keyboard shortcut? It wouldn’t be completely automatic…

  • shabi

    How make d attribute section @ section line …?

  • Kiran

    Hii,
    When we insert the block attribute using “ATTIN” Command, is it possible to insert with a leader ???

  • madhu

    sir i want attributes making videos
    please

  • Shivakumar N

    Awesome help in Deed. Thanks to Ellen Finkelstein.
    Manjunatha Swamy Ki Jai.

  • Jacob

    Hi and thanks for the wonderful post,
    I was wondering, I know that you could reference attributes to other block attributes by linking the fields, but what I was trying to create is a block that you could attach to any given block in the drawing and when attached it should automatically copy the attributes of the original block, think of it like an equipment tag that when attached to any equipment block, attributes should be copied into the tag.
    Thank you

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=""> <s> <strike> <strong>