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


IEditor3.AddTemplates Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Editor)  

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