ArcGIS Pro 2.7 API Reference Guide
CreateTemplate(Layer,String,String,Inspector,String,String[],String[]) Method

ArcGIS.Desktop.Mapping Namespace > MappingExtensions Class > CreateTemplate Method : CreateTemplate(Layer,String,String,Inspector,String,String[],String[]) Method
the layer the new template is to be added to.
the template name.
Optional description of the template.
An ArcGIS.Desktop.Editing.Attributes.Inspector object containing default template values.
Optional, If not provided will use the default tool for the layer type. The defaultTool can be specified using daml-id.
Optional. A set of tags.
Optional list of tools to not allow for this template. Tool filters can be specified using daml-id.
Creates a new template using the specified definition. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
Public Overloads Shared Function CreateTemplate( _
   ByVal layer As Layer, _
   ByVal templateName As String, _
   Optional ByVal description As String, _
   Optional ByVal inspector As Inspector, _
   Optional ByVal defaultTool As String, _
   Optional ByVal tags() As String, _
   Optional ByVal toolFilter() As String _
) As EditingTemplate

Parameters

layer
the layer the new template is to be added to.
templateName
the template name.
description
Optional description of the template.
inspector
An ArcGIS.Desktop.Editing.Attributes.Inspector object containing default template values.
defaultTool
Optional, If not provided will use the default tool for the layer type. The defaultTool can be specified using daml-id.
tags
Optional. A set of tags.
toolFilter
Optional list of tools to not allow for this template. Tool filters can be specified using daml-id.

Return Value

the newly created template. Null if it cannot be created.
Exceptions
ExceptionDescription
the Template name cannot be empty. And the template name must be unique.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MappingExtensions Class
MappingExtensions Members
Overload List