Delete Diagram Template (Network Diagram)

Summary

Deletes a diagram template and all diagrams based on that template.

Caution:

This tool is a configuration and administration tool.

Usage

  • This tool is not supported when working with a utility network or trace network service. You must use either a utility network or trace network in a file geodatabase or a database connection to a utility network or trace network in an enterprise geodatabase. When working with an enterprise geodatabase the following are requirements:

  • Deleting a diagram template deletes all diagrams, and their content, based on that template from the database.

Syntax

arcpy.nd.DeleteDiagramTemplate(in_utility_network, template_name)
ParameterExplanationData Type
in_utility_network

The utility network or trace network related to the diagram template to delete.

Utility Network; Trace Network
template_name

The name of the diagram template to delete.

String

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network or trace network.

Utility Network; Trace Network

Code sample

DeleteDiagramTemplate example (Python window)

Delete the MyTemplate1 template existing for a given network.

import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"

arcpy.DeleteDiagramTemplate_nd(input_Network, input_DiagramTemplate)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics