This document is archived and information here might be outdated. Recommended version. |
IEditTemplate Interface
This interface contains the properties of the template including the associated layer and the default values for fields.
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.
Name | Description | |
---|---|---|
ClearDefaultValues | Removes all the default values currently set. | |
CreateCount | Returns the number of times this template has created a feature. | |
DefaultValue | Gets the default value for the given field. | |
Description | Gets the description of the template. | |
Layer | Gets the layer of the template. | |
Name | Gets the name of the template. | |
SetDefaultValue | Sets the default value for the given field. If the field is a subtype field it will use initDefaultValues. | |
SetDefaultValues | Sets the default values on the given feature. | |
Tags | The tags of the item. | |
Tool | Gets the tool for the template. |
CoClasses and Classes | Description |
---|---|
EditTemplate | EditTemplate Class |
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);