This document is archived and information here might be outdated.  Recommended version.


IEditor3.AddTemplates Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IE > IEditor3 Interface > IEditor3.AddTemplates Method
ArcGIS Developer Help

IEditor3.AddTemplates Method

Adds the specified edit template. The template was created with the EditTemplateFactory.

[Visual Basic .NET]
Public Sub AddTemplates ( _
    ByVal editTemplateArray As IArray _
)
[C#]
public void AddTemplates (
    IArray editTemplateArray
);

Product Availability

Available with ArcGIS Desktop.
[C#]
//Create a new template to add.
IEditTemplateFactory pEditTempFact = new EditTemplateFactoryClass();
IEditTemplate pEditTemplate = pEditTempFact.Create("New template", pLayer);

//Set a default tool and a description of the template.
Guid g = new Guid("{0A7C16B9-1CFD-467F-8ECE-6BA376192431}");
pEditTemplate.Tool = g;
pEditTemplate.Description = "Major roads template.";

//Add the template.
IArray templateArray = new ArrayClass();
templateArray.Add(pEditTemplate);
m_editor.AddTemplates(templateArray);

See Also

IEditor3 Interface