ArcGIS Pro 2.6 API Reference Guide
AutoGenerateTemplates Method

ArcGIS.Desktop.Mapping Namespace > MappingExtensions Class : AutoGenerateTemplates Method
(Optional) Remove existing templates and regenerate. (default value = false)
Generate feature templates for a layer or standalone-table. This method must be called on the MCT. Use QueuedTask.Run
Syntax
public static bool AutoGenerateTemplates( 
   MapMember mapMember,
   bool forceCreate
)
Public Shared Function AutoGenerateTemplates( _
   ByVal mapMember As MapMember, _
   Optional ByVal forceCreate As Boolean _
) As Boolean

Parameters

mapMember
forceCreate
(Optional) Remove existing templates and regenerate. (default value = false)

Return Value

Boolean. True if templates were genenerated.
Remarks
This method attempts to generate feature templates on a layer or standalone-table. If ArcGIS.Core.CIM.CIMBasicFeatureLayer.AutoGenerateFeatureTemplates flag is true, the templates are generated from the renderer. When false the templates are not regenerated unless forcecreate is specified.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

MappingExtensions Class
MappingExtensions Members