This document is archived and information here might be outdated. Recommended version. |
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 );
//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);