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 service. You must work with either a utility network or trace network in a file geodatabase or a database connection to a utility network in an enterprise geodatabase. When working with an enterprise geodatabase, the connection must be established as the database utility network owner.

  • When performing this operation on a utility network in an enterprise geodatabase, the connected ArcGIS Enterprise portal account must be the portal utility network owner.

  • The network data element specified for the input network parameter must be from either a utility network or trace network in a file geodatabase or a database connection to a utility network in an enterprise geodatabase.

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

Syntax

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