Delete Diagram (Network Diagram)

Summary

Deletes one or more stored network diagrams, which are optionally filtered by their diagram template names, related to a given network.

You can specify a single diagram, a set of diagrams, or a diagram template name. When specifying a diagram template, all associated diagrams are deleted.

Caution:

You must save any edits prior to deleting a diagram.

Learn more about deleting diagrams

Usage

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

  • The input network or network diagram layer must be from either a utility network or trace network in a file geodatabase or utility network service.

  • You can delete diagrams you own and public diagrams you don't own, except utility network subnetwork system diagrams. The portal utility network owner must be connected to the ArcGIS Enterprise portal in this case, because the portal owner is the only one who can delete subnetwork system diagrams.

  • If you have multiple diagrams associated with your network, you can filter them based on their diagram template names. If you do not know the name of the diagram but do know one or more features associated with the diagram, you can use the Find Diagrams command.

  • This tool uses either a list of diagram names to delete or a given diagram template name so all the related diagrams are deleted.

Syntax

DeleteDiagram(in_diagrams, {template_names}, {diagram_names})
ParameterExplanationData Type
in_diagrams

The input network diagram layer to delete, or the utility network or trace network layer on which the set of specified input diagram names to delete are based.

Utility Network; Trace Network; Utility Network Layer; Trace Network Layer; Diagram Layer
template_names
[templatenames,...]
(Optional)

The names of the templates for which the related diagrams are to be processed.

String
diagram_names
[diagram_names,...]
(Optional)

The names of the diagrams to be processed.

String

Derived Output

NameExplanationData Type
out_diagrams

The updated utility network or trace network data element or layer.

Utility Network; Trace Network; Utility Network Layer; Trace Network Layer; Diagram Layer

Code sample

DeleteDiagram example (Python window)

Delete all the diagrams based on the ReducedDiagrams template related to the input network.

import arcpy
input_Network = "https://cezembre.esri.com/server/rest/services/Naperville_Electric_SQL/FeatureServer/0"
arcpy.DeleteDiagram_nd(input_Network, "ReducedDiagrams")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics