blog

Becoming a Master of Sheet Sets: Automate Title Block Data in AutoCAD – AutoCAD Blog

As we continue on our sheet set journey, it’s time to take the next, big step and learn how to automate title block data in AutoCAD.

AutoCAD offers considerable flexibility in the way you create and edit your title blocks. For example, you might attach your title block as an external reference but store the title block data as text within each drawing. Alternatively, you might insert your title block in a template file and then edit title block attributes each time you create a new drawing from the template.

Regardless of how you create and use your drawing title blocks, you can significantly automate the process of updating title block data by using fields. The field functionality in AutoCAD enables you to include sheet set data in your drawing title blocks so that, as sheet and sheet set information changes, the title block data stays current. To automate your title block data, you must replace the existing data with field codes. You can insert field codes using the Field dialog box that is accessible in most text and attribute editing tools. The Field dialog box includes field codes for common data such as current date, sheet number, and drawing name. In addition to using the predefined field codes, you can insert custom sheet set fields that you create yourself.

While there are many ways to create a title block, the most common is to use a block definition with attributes for the various title block data, and include that block on the layout of a template file. This is the method used below to describe how to automate your title block data, but keep in mind that you can apply much of this information to other methods as well.

If your title block is inserted in a template file, you want to update your title block to include fields. Your first instinct might be to open the template file and edit the title block from there. Although this method will work, it does not offer you instant feedback as you select various sheet set fields because the template file itself is not a sheet in the sheet set. If you make a mistake somewhere along the way, you will spend far more time trying to troubleshoot than you spent on the initial setup. The easiest way to add fields to your title block — with the assurance that you are selecting the proper fields — is to work with it as part of the sheet set.

In the previous article on creating new sheets, you (hopefully) updated your sheet set properties so that your sheet set uses your existing drawing template to automatically create new sheets in the sheet set. That sheet creation template is, presumably, the same file that you want to update with fields. So, if you create a new sheet in the sheet set and it uses that template, how does the new sheet compare to the template file? It is exactly the same, right? It is just like using the traditional methods of selecting File>New and choosing your template. The new drawing is exactly the same as the template file. The only difference when creating a new sheet as part of a sheet set is that the new drawing is actually a sheet in the sheet set. Because it is a sheet in the sheet set, when you insert sheet set fields, you will immediately know if you have the right field because it will display the current sheet set data. If you add fields directly to the default template file (which is being used by the sheet set but isn’t actually a sheet in the sheet set), your sheet set fields will display as pound or hashtag “#” signs because AutoCAD has no relevant values to insert.

INTERESTING:   Get up to speed on AutoCAD 360 Pro| Mobile CAD

To ensure that you insert the proper sheet set fields the first time (and minimize the amount of trouble-shooting), it’s strongly recommended that you first create a new sheet in the sheet set, add the fields to the title block, then remove the new sheet from the sheet set, and finally, save the new drawing (with the updated title block) over your old template file. This may sound complicated, but it really isn’t. It is just like making a copy of your template file, updating it, and then replacing the old one.

1. In the Sheet Set Manager, on the Sheet List tab, right-click and choose New Sheet.

2. In the New Sheet dialog box, enter values for the sheet number and title. Since you will eventually remove this sheet from the sheet set, the values you enter don’t necessarily matter. However, it’s recommended that you enter meaningful values so that when you insert the sheet number and sheet title fields in your title block, you will get useful feedback to help ensure you have selected the correct sheet set fields. For example, you could use “SheetNum” and “SheetTitle” for the sheet number and title.

3. In the Sheet Set Manager, double-click on the new sheet to open it in the drawing editor. This opens the new sheet (drawing file) which is exactly like your template.

Before describing what to do next, it may be even more important for you to learn what NOT to do! The most common mistake people make at this point is to either double-click or use BATTMAN to edit the title block.

  • Double-click on the title block and add fields for each of the attributes. This response is completely understandable because you’ve been trained to double-click. If you want to change something about an object in the drawing, double-click! Yes, that is the natural response, but you should never double-click on a block reference to add fields to attributes. Why? Because when you double-click on a block reference with attributes, AutoCAD displays the Enhanced Attribute Editor, which is how you edit the “Value” of an attribute instance. It does not enable you to edit the attribute definition itself. Although you could right-click in the Value box and choose Insert Field and everything might appear to work, somewhere down the line (tomorrow, next week, next year) someone is going to erase and reinsert the title block and if you updated the “Value” of the instance rather than the “Default” of the attribute definition, your title block automations will be gone. NEVER add fields to an attribute “value”. Insert them as a “default” in the attribute definition.
  • BATTMAN (Block ATTribute MANager) is a tool that you can use to edit your block attribute definitions without exploding and redefining the block. Yes, this is a natural response and yes, it seems like it should work…. And it does. HOWEVER, attribute functionality was specifically designed (way back) so that if you updated the default value of an attribute in a block definition, those default values would not apply to existing attributes in block insertions. This was intentional behavior because if you had many attributes in many block instances for which you had entered individual attribute values, you might not want all of those values to be instantly replaced by the default value. What about ATTSYNC? ATTSYNC will update existing block insertions to include new/updated attribute definitions but it does NOT update attribute values for existing block insertions. REFEDIT and BEDIT have the same issues as BATTMAN.
INTERESTING:   Autodesk Future Designers See the Light

If you decide to still use any of these methods to update the attribute definitions, you must erase and reinsert the title block to ensure that the attributes in the block insertion are using the new attribute definitions. Alternatively, you can simply explode, update, and then redefine the title block. However, keep in mind that if you explode your title block, any dynamic block functionality within the title block definition will be lost. Now onto our regularly scheduled recommendation!

4. Access the attribute definitions for each title block attributes for which you want to insert a field using whatever method you choose. (BATTMAN, REFEDIT, BEDIT, EXPLODE). Regardless of the method you choose, you will know you are adding the fields to the attribute definition rather than the attribute value if the label says “Default” instead of “Value”.

Automate Title Block Data AutoCAD

5. Right-click in Default and select Insert Field.

Automate Title Block Data AutoCAD

6. In the Field dialog box, select the appropriate Field category and Field name. The field category and name that you choose depends on the attribute you are currently editing. For example, if you want the attribute to display the current date, you would select the Date & Time field category and the Date field name. Most of the fields that you will use for title block data are in the SheetSet field category and the field names begin with “CurrentSheet”. Using the CurrentSheet fields in your title block enables AutoCAD to read the values that apply to any sheet in which the title block is inserted. For example, you will probably want attributes that display the CurrentSheetNumber and CurrentSheetTitle.

If you created custom sheet set properties, you can access them using the CurrentSheetSetCustom and CurrentSheetCustom field names. Of these two custom options, the one you select depends if the custom property you created is owned by the sheet set or by the sheet. A drop-down list enables you to see all of the available custom properties. For example, if you created a custom sheet set property called Project Name, which is owned by the sheet set, you would select the CurrentSheetSetCustom field name and then select Project Name from the Current Property Name list.

As you apply fields to your attribute definitions, you receive instant feedback by seeing the appropriate value displayed. If you do not see a value, the sheet set property has not been assigned a default value. You might find it helpful to include generic default values for all of your sheet set properties. For example, in the Description property for a sheet, enter the words “Sheet Description”. The instant feedback that you receive during the field insertion process is the reason why it’s helpful to update the title block drawing as part of a sheet set rather than editing the template file directly. If you opened the template file without it being part of the sheet set, you would receive no feedback regarding sheet set properties and because it would have no current sheet set to read from, the list of custom property names would be blank requiring you to type the exact name of the custom property rather than selecting it from a list.

INTERESTING:   Fields: Exploring the Features and Benefits of AutoCAD - AutoCAD Blog

You will repeat the process to add fields for each attribute. Below are some examples of typical title block data and the associated fields include one example with multiple fields combined in a single attribute definition. If you want to display the sheet number as 1 OF 20, 2 OF 20, etc., you can insert the Sheet number “OF” and then insert a custom field for the total number of sheets. AutoCAD will not count the sheets for you, but at least you only have to enter the total number of sheets in one location (the sheet set properties) and it can be read throughout the entire sheet set!

Automate Title Block Data

After you update all of the title block data, you must remove the title block drawing from the sheet set and use it to replace the old sheet creation template.

1. In the SSM, right-click on the sheet you have been working on and choose Remove Sheet. The drawing is still open but it no longer belongs to the sheet set.

2. If you used BATTMAN, REFEDIT, or BEDIT to update the attribute definitions, you must erase the existing title block and reinsert it to ensure the attribute values use the newly added fields.
-Or-
If you used EXPLODE to update the attribute definitions, you must redefine the block (BMAKE).

3. From the File menu, choose SAVEAS.

4. In the Save Drawing As dialog box, select the appropriate file type (DWT, DWG, or DWS), and select the sheet creation template file to overwrite. Prior to saving the file, it is a good idea to verify the file name and path of the sheet creation template in the Sheet Set Properties to ensure that the one you overwrite is the same one that is being used by the sheet set.

After you replace your previous title block template with your new version, you should verify that all the title block fields function properly. You can do this by creating a new sheet using your new template and then reviewing and editing the associated title block data. Once you have verified that your title block data updates appropriately you are good to go! New sheets that you create using your title block will automatically display the current sheet information and, with little effort, you can replace the title blocks in the existing drawing layouts that you imported. Simply erase and purge the old title block definition from existing drawings and insert the new title block. You don’t have to reenter the attribute data because it is stored in the sheet set and automatically read by the title block fields.

What’s Next?

Stay tuned for the next installment of our series as we explore plotting and the Page Setup Manager. Remember, you can always catch up on the entire Mastering AutoCAD Sheet Sets series!

Source: Autodesk

Back to top button

Adblock Detected

Please disable your ad blocker to be able to view the page content. For an independent site with free content, it's literally a matter of life and death to have ads. Thank you for your understanding! Thanks