ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Editing.Templates Namespace / EditingTemplate Class / SetDefinition Method
the new CIM definition for this template.
Example

In This Topic
    SetDefinition Method (EditingTemplate)
    In This Topic
    Sets the CIM definition of this EditingTemplate. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public void SetDefinition( 
       CIMEditingTemplate definition
    )
    Public Sub SetDefinition( _
       ByVal definition As CIMEditingTemplate _
    ) 

    Parameters

    definition
    the new CIM definition for this template.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Update a Table Template
    QueuedTask.Run(() =>
    {
      var tableTemplate = table.GetTemplate("Template1");
    
      var definition = tableTemplate.GetDefinition();
      definition.Description = "New definition";
      definition.Name = "New name";
      // update the definition
      tableTemplate.SetDefinition(definition);
    });
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also