IEditTemplate Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IE > IEditTemplate Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

IEditTemplate Interface

IEditTemplate Interface

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

This interface contains the properties of the template including the associated layer and the default values for fields.

When To Use

Templates are created using the IEditTemplate and IEditTemplateFactory interfaces and managed through the IEditor3 interface.

The current or selected template can be obtained from the IEditor3::Currenttemplate method returning IEditTemplate. 

The symbology for the template is determined by the value of the field used to render the layer in the map and is handled internally.


Templates are stored within the map document and within a layer file if the layer is exported as such.

Members

Name Description
Method ClearDefaultValues Removes all the default values currently set.
Read-only property CreateCount Returns the number of times this template has created a feature.
Read-only property DefaultValue Gets the default value for the given field.
Read/write property Description Gets the description of the template.
Read/write property Layer Gets the layer of the template.
Read/write property Name Gets the name of the template.
Method SetDefaultValue Sets the default value for the given field. If the field is a subtype field it will use initDefaultValues.
Method SetDefaultValues Sets the default values on the given feature.
Read/write property Tags The tags of the item.
Read/write property Tool Gets the tool for the template.

CoClasses that implement IEditTemplate

CoClasses and Classes Description
EditTemplate EditTemplate Class
[C#]

New templates are created via the IEditTemplateFactory interface for a given layer.

//create a single template for the selected layer
ILayer pLayer=m_doc.SelectedLayer;     
IEditTemplateFactory pEditTempFact=new EditTemplateFactoryClass();
IEditTemplate pEditTemplate=pEditTempFact.Create("Venice", pLayer);

.NET Samples

Points along line construction tool (Code Files: PointsAlongLineForm)

.NET Related Topics

Creating features in the editor | Using feature templates