ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data.NetworkDiagrams Namespace / DiagramManager Class / GetDiagramTemplate Method
The name of the diagram template.
Example

In This Topic
    GetDiagramTemplate Method
    In This Topic
    Retrieves the DiagramTemplate with the specified name. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public DiagramTemplate GetDiagramTemplate( 
       string name
    )
    Public Function GetDiagramTemplate( _
       ByVal name As String _
    ) As DiagramTemplate

    Parameters

    name
    The name of the diagram template.

    Return Value

    The DiagramTemplate with the specified name.
    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    This method or property must be called within the lambda passed to QueuedTask.Run
    Example
    Get Diagram Templates
    public void RetrieveDiagramTemplates(UtilityNetwork utilityNetwork)
    {
      using (DiagramManager diagramManager = utilityNetwork.GetDiagramManager())
      {
        // get all templates
        IReadOnlyList<DiagramTemplate> templates = diagramManager.GetDiagramTemplates();
    
        // get a template by name
        DiagramTemplate template = diagramManager.GetDiagramTemplate(templateName);
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also