Working with Templates

Have you ever wanted to create a new drawing file in AutoCAD and have all your text styles, dimension styles, layers, units, and other drawing settings already setup and ready to go? We've heard some customers say the way they start a new drawing is to open an existing drawing, save the drawing with a new name, and delete the geometry. This is time-consuming and can lead to outdated or broken standards.

Note: The video doesn't contain audio or closed captions.

Using a drawing template with predefined drawing settings is an efficient way to start a new drawing and can help enforce drawing standards for your office.

Note: Steps, images, and videos may differ slightly from your version of the product.

What Can Be Saved in a Template

Most drawing settings and named style information that are used when you start a new drawing can be saved in a template. There might be drawings where you don't use all the linetypes or styles in the template, and that's ok, but the drawing template should include the standards you need to get started.

Here's some of drawing settings that can't be stored in a drawing template:

Using Existing Templates

Autodesk provides several templates that are installed with AutoCAD. These templates can be accessed from the Start tab on the Templates drop-down list.

Note: Starting in AutoCAD 2022, click the New drop-down to access the templates installed with AutoCAD.

While these templates are a good place to start, chances are they're not going to have the settings you might need.

The templates installed with AutoCAD are located:

c:\Users\<user name>\AppData\Local\Autodesk\AutoCAD 2021\R24.0\enu\Template\

Note: The template storage location can be changed to a shared location so all AutoCAD users in your company share the same templates. The list under Templates is updated if the template storage location is changed.

Opening and Saving a Template

To make a change to a template, you'll need to open it. Opening a template is like opening a drawing.

  1. Choose Open from the Quick Access Toolbar.

    Or at the Command prompt type, open.

  2. In the Files of type drop-down list, choose Drawing Template (*.dwt).

    You should see the templates installed with AutoCAD.

  3. Select a template and click Open. For this exercise, we'll select acad.dwt.
  4. Note: Changing the template only affects new drawings, and does not affect any drawings that were previously created using that template.
    The template name appears on a drawing tab with a .dwt extension and is ready for editing.
    Saving and closing a template is like saving a drawing. Click Save or Save As from the Quick Access Toolbar to save the template and keep working.
  5. For this exercise, I'll create a new template by clicking Save As and give the template a name, MyTemplate, and click Save.
  6. In the Template Options dialog box, enter a description for the template and leave the rest of the defaults as they are and click OK.

Changing the Default Template for a New Drawing

Now that you have a template created and saved, let's start using it. By default, when you start a new drawing, AutoCAD creates the drawing from the template specified in the Default Template File Name for QNEW, in this case, acad.dwt. Let's change this setting to start a new drawing using the new template.

  1. In the drawing window, right-click and choose Options.

    Or at the Command prompt type, options.

  2. Click the Files tab and expand Template Settings > Default Template File Name for QNEW.
  3. Select the file path and choose Browse.

    Or double-click the file path to browse.

    Note: None is the default option for Default Template File Name for QNEW. When it's set to None the QNEW command acts like the NEW command.
  4. From the Select a file dialog box, browse to and select the template file you want AutoCAD to use as the default for a new drawing, in this case MyTemplate, and click Open.
  5. Click OK to close the Options dialog box.

    Now when you start a new drawing, AutoCAD will use MyTemplate.

Editing and Testing Template

So far, we talked about where the templates are stored, how AutoCAD uses a template when you open a new drawing, and how to create a new template from one of the provided sample templates.

Now let's get into editing a template. Editing a template is like editing a drawing. Follow the steps above to open MyTemplate.

Think about what you would like to have already setup when you create a new drawing and consider adding the drawing settings to MyTemplate.

Here are a few drawing settings that might be useful:

  • Turning the grid display off
  • Changing the drawing window color
  • Adding standard layers
  • Creating text and dimension styles
  • Having a title block available to insert
  • Setting drawing units

All of these are drawing settings that can be added to a template so the next time you create a new drawing it's ready to go.

An easy way to test the changes to the template is to first save it, then click the + on the drawing tabs to create a new drawing. Keeping the template open for testing makes changes to the template very quick.

Note: If you are not seeing the template changes in the new drawing make, sure you have the Default Template File Name for QNEW in the Options dialog box set to use MyTemplate.

Import Styles and Layers from DesignCenter

DesignCenter can be used to add layers, named styles, and blocks, to a template.

  1. In this exercise, open MyTemplate.dwt.
  2. Click View tab > Palettes panel > DesignCenter Find

    Or at the Command prompt, type adcenter.

  3. Add the layers, blocks, and styles from Landscaping.dwg to the template.

  4. In DesignCenter, navigate to Landscaping.dwg and drag the drawing into the drawing area of the template.
Note: If you only want the block definitions available to insert from the Blocks palette press Esc after the drag and drop. Otherwise, the blocks will be inserted into the template drawing window.

Now the named styles, blocks, and drawing settings that are defined in Landscaping.dwg are now available in MyTemplate.

Create a new drawing to test MyTemplate and verify the blocks are available in the new drawing.

Note: You can use PURGE to remove the named styles, blocks, and drawing settings, or any other information you don't want to have in a template.

What if you need to go from an updated template to an existing drawing? Let's say you want to import some named styles, blocks, and drawing settings from your updated company template. These styles were added to the template after you started your drawing, so they weren't brought in from the template.

In a previous Have You Tried, we talked about adding named styles from an updated template into an existing drawing. That information can be found in the Have You Tried: Import Styles under the Import Multiple Styles section.

Templates can be a powerful tool for enforcing standards in your office and a time-saver when creating new drawings. They are not difficult to setup and can be easily created, edited, and shared as office standards change.

Template Commands and System Variables

Here are the most commonly used commands and system variables related to templates.

Commands Description
ADCENTER Manages and inserts content such as blocks, xrefs, and hatch patterns.
NEW Creates a new drawing.
PURGE Removes unused items, such as block definitions and layers, from the drawing.
QNEW Starts a new drawing from a specified drawing template file.
UNITS Controls the precision and display formats for coordinates, distances, and angles.
System Variable Description Default Value Saved In
AUNITS Sets units for angles. 0 Drawing
AUPREC Sets the display precision for angular units and coordinates. 0 Drawing
LUNITS Sets the linear units format for creating objects. 2 Drawing
LUPREC Sets the display precision for linear units and coordinates. 4 Drawing
MEASUREMENT Controls whether the current drawing uses imperial or metric hatch pattern and linetype files. 0 (imperial) or 1 (metric) Drawing