This document is archived and information here might be outdated. Recommended version. |
Removes all templates from the specified layer.
[Visual Basic .NET] Public Sub RemoveAllTemplatesInLayer ( _ ByVal layer As ILayer _ )
[C#] public void RemoveAllTemplatesInLayer ( ILayer layer );
//To remove a layers templates you need a reference to the map document
//and the layer for which you want to remove templates.
m_mxdoc = m_app.Document as IMxDocument;
ILayer pLayer = m_mxdoc.FocusMap.get_Layer(1);
m_editor.RemoveAllTemplatesInLayer(pLayer);