Best practices for using feature templates

Getting started with feature templates

Creating features is accomplished through the use of feature templates. Feature templates define all the information required to create a feature: the layer where a feature will be stored, the attributes a feature is created with, and the default tool used to create that feature. Templates also have a name, description, and tags that can help you find and organize them. If templates are not present when you start editing, they are automatically created for each layer in the current editing workspace. Templates are saved in the map document (.mxd) and the layer file (.lyr).

Cases wherein ArcMap creates feature templates automatically

When you start editing either a saved map document or a brand new map, ArcMap checks to see if you have any existing feature templates in the map. If no templates are found, ArcMap automatically creates them to help you get started adding features. If you have layers from several different geodatabases or folders of shapefiles in a data frame or multiple data frames in a map document, ArcMap creates templates the first time you start editing in each workspace or data frame if there are no existing templates.

When templates are created automatically, they are generally created for all types of symbology. However, templates work best when creating features symbolized by categories, as a single symbol, or by representations, rather than with quantities or charts.

Once templates are created the first time you start editing, they are not added automatically after that. You need to create the templates yourself for layers subsequently added to the map. This allows you to control the creation of templates and avoid cluttering the list of templates with templates for layers that may not be used for editing.

Creating new feature templates

To create feature templates, open the Organize Feature Templates dialog box from the Create Features window and start the Create New Templates wizard. The wizard steps you through the quick process of making a template: first, you choose the layer or layers, then, if applicable, choose any or all classes within that layer to make into individual templates. Once the templates are created, you can change their default properties, copy and paste them, or delete them.

You can make a copy of an existing template to use it as the basis of a new template. For example, if you want a different default attribute for one of the fields in the layer, copy and paste the template, then change the new template's properties. This saves you from going through the wizard to make just a slight change to a template.

If you add a layer to your map, significantly change the symbology used to draw the features, or add a symbology category (such as for a layer drawn with unique values), you need to create new templates to be able to add features in that layer.

Create New Templates Wizard

Setting a feature template's properties

The default attribute values are some of the most important properties you can set for a feature template. The attributes set on the Template Properties dialog box are assigned to new features created with that feature template. Setting the appropriate default values saves you time and improves accuracy, since the attributes are populated automatically in the new features.

Each template has a default construction tool, which you can set in the template's properties. Setting the default tool can help you avoid an extra click to choose a different tool to create new features. For example, when you are drawing rectangular building footprints, set that template's default construction tool to the Rectangle tool so that tool automatically becomes active when creating building footprints. You can always override the default tool and choose a different one in the Create Features window.

Template Properties dialog box

Feature templates and the table of contents

Templates are always synchronized with the contents of the map. If you turn off a layer in the table of contents, the layer's templates are hidden on the Create Features window. If you save a layer as a layer file (.lyr) from ArcMap, the layer's templates are saved in it as well.

When a layer is not visible because it is turned off in the table of contents, beyond its visible scale range, or does not satisfy the current definition query, its associated templates are hidden on the Create Features window. You need to make the layer visible again before you create features in it. This way, you can choose the template, but additionally, the new features will be displayed on the map once they are created, rather than immediately disappear because the layer is not visible.

Furthermore, when working with definition queries, only feature templates with default attribute values that satisfy the query are listed in the Create Features window. For example, if you have a definition query to display just the major roads in a layer containing several different road types, you only see the feature templates that have the road type default attribute value of major roads. If you start editing and there are no feature templates in the Create Features window for a layer with a definition query, open the Organize Feature Templates dialog box, click the layer's name, open the properties for the template, and set a default attribute value that matches the definition query—in this case, set the road type field to major roads. If you need to add features with other attributes, such as minor roads, you should first update the definition query to make the features display on the map, then you can create templates with other default attributes.

Before you create a new template for a layer, make sure the layer is visible and that the template is not hidden from view through the use of a filter in the Create Features window. In addition, when you open the Organize Feature Template dialog box, click the layer's name to see if any templates already exist. This may save you from making new templates that are duplicates of the existing ones.

Feature templates in editing commands

Some editing commands, such as those on the Editor menu, use a dialog box to allow you to choose a template when creating new features.

The template specifies the layer where a feature will be stored and the default attributes for the new features. For a template to be listed in the window, it must already exist and must be the appropriate target geometry type; other template types are filtered from the list and not shown.

Editing commands that can only output one type of geometry (such as Copy Parallel, which only produces lines) list templates just for that layer type. Commands that can output a variety of layer types list any existing templates that are the proper types. For example, the Buffer command can create either line or polygon features, so line and polygon templates may both be listed in the window. If you have created templates for a line layer but not for a polygon layer, only the line templates are listed in the window because there are no available polygon templates in the map. In that case, to choose a polygon as the output, close the command's dialog box, launch the Create New Templates Wizard from the Create Features window, then create a template for the polygon.

Choosing a feature template when using an editing command

If you have no templates at all for any of the layers in your map, you can choose from a list of available layers in which to create the new features. However, if you have templates for only certain layer types, a message appears if you attempt to use a command that requires templates for a different type. For example, when using Copy Parallel, if you have a template in the map for a polygon but no line templates, a message tells you to create line templates to use the command.

When copying features, however, you choose the layer in which to store the new feature. This allows you to retain the attribute values from the copied feature, rather than having them be overwritten with values from a feature template. This applies to commands such as Paste and Copy Features.

Finding and organizing feature templates

You can search for templates on the Create Features window. When you search, only the templates that satisfy your query are shown on the Create Features window. To find and identify templates more easily, give them clear and descriptive names. This also applies to the layers and symbol labels, since they provide the default template names. You can enter a description, which appears as a ToolTip pop-up text when you rest your pointer over a template. The description property allows you to provide additional information about the contents and intended use of a particular template.

Template Properties with a description and tags

In addition, you can add tags to a template. A tag is generally a short keyword, metadata item, or any other term that helps to identify a template when searching for it. Tags can be used as a form of categorization so only the templates that meet certain criteria are displayed in the Create Features window. For example, you are creating polygon features representing animal habitats. You can tag your feature templates to filter them by habitat type so you only see the habitats that apply to certain animals. When you are creating a grizzly bear habitat polygon, you can hide the feature templates for marine and desert environments, which are locations were grizzly bears are not likely to reside.

There are several different ways to sort and group templates in the Create Features window. If you have many templates in your map that are not currently being used, consider hiding them with a filter (such as only showing certain types of layers), rather than deleting them altogether. This way, you can access them again when you need them. This can help minimize the list of items shown in the Create Features window so you can easily find the templates you want. You can also search through the templates to choose the ones you want and hide the others.

Updating feature template properties

If you find that you want to change the default attribute values for new features or repeatedly switch from the default tool to a different one, update the properties of the template.


The symbol for a template is read-only on the Template Properties dialog box. This is because the template properties simply reflect the current symbology set on the Layer Properties dialog box. If you want to change the symbol used for a template, you need to change on the Layer Properties > Symbology tab. In some cases, the template cannot draw the symbol, such as for certain <All other values> entries when drawing a layer with unique values. In those cases, you need to update the Layer Properties.

Keep in mind that templates are used only at the time a feature is created. Once a feature is created, there is no link back to the template. If you update the default attribute values of a template, for example, those attribute values are not retroactively applied to existing features. Changes made to a template's properties are only reflected in new features created with that template after the change has occurred. To update the attribute values of a feature that has already been created, use the attribute table or the Attributes window.

Creating multiple feature templates for the same symbology

You can create multiple templates for a layer even if you are symbolizing with a single symbol. You might do this when you have a layer that should all be displayed the same way but the features you want to create have different attribute values. For example, if you are creating lines to represent pipeline features, you could create several feature templates with different default attributes for the common types of material or diameter sizes.

Deleting unnecessary feature templates

If you had many layers that you will never edit in your map the first time you started editing (so templates were created automatically), you can delete the templates you are not using. For example, if you have 10 layers in your map but are only creating new features in two of them, delete the other templates so it makes it easier for you to find the templates you need.

If you have changed the rendering of several layers since the templates were initially created, it may be best just to delete all your templates and start again so the templates are synchronized better with your current symbology. Once you delete them, simply start the Create New Templates wizard and make templates for only the layers in which you want to create features.

A better practice, however, is to spend some time preparing the map and its symbology prior to actually starting editing and creating templates.

Creating maps to share with other editors

If you are creating a map that other editors will use, you should ensure that all the elements necessary to create features are easy to understand by all the editors. This involves clearly naming layers and symbol labels, since these are used to identify the feature templates in the Create Features window. This also applies when you are serving the map through ArcGIS Server, as editors who edit the contents of the map through the Web or by downloading the data locally also receive the feature templates from the map.

Related Topics