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

GetDiagramTemplate Method
Retrieves the DiagramTemplate with the specified name. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public DiagramTemplate GetDiagramTemplate( 
   string name
)

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

ArcGIS Pro version: 3 or higher.
See Also