Public Function GetDiagramTemplate( _ ByVal name As String _ ) As DiagramTemplate
public DiagramTemplate GetDiagramTemplate( string name )
Parameters
- name
- The name of the diagram template.
Return Value
The DiagramTemplate with the specified name.
Public Function GetDiagramTemplate( _ ByVal name As String _ ) As DiagramTemplate
public DiagramTemplate GetDiagramTemplate( string name )
| Exception | Description |
|---|---|
| ArcGIS.Core.Data.Exceptions.GeodatabaseException | A geodatabase-related exception has occurred. |
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run |
{
// Get all the diagram templates or a template by name
static void RetrieveDiagramTemplates(UtilityNetwork utilityNetwork)
{
string templateName = "ElectricNetworkTemplate";
using DiagramManager diagramManager = utilityNetwork.GetDiagramManager();
// Get all templates
IReadOnlyList<DiagramTemplate> templates = diagramManager.GetDiagramTemplates();
// Get a template by name
DiagramTemplate template = diagramManager.GetDiagramTemplate(templateName);
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)