Purge Temporary Diagrams (Network Diagram)

Summary

Purges temporary network diagrams related to a given utility network or trace network.

Caution:

This tool is an administration tool. When working with a utility network in an enterprise geodatabase, it must be run by the database utility network owner through a database connection to the default version. The default version must be public and not protected.

In addition to that requirement, the connected ArcGIS Enterprise portal account must be the portal utility network owner to run this tool.

Learn about purging temporary diagrams

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.

  • 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.

  • Use this tool regularly to clear a diagram dataset and reduce the size of the database. By default, when a network diagram is created, it is a temporary diagram. If it's not stored, the temporary diagram remains in the project until its associated map is closed. When the map is closed, the temporary diagram is discarded, but it is not purged from the database.

Syntax

PurgeTemporaryDiagrams(in_utility_network, {created_before})
ParameterExplanationData Type
in_utility_network

The utility network or trace network data element with the temporary diagrams to be purged.

Utility Network; Trace Network
created_before
(Optional)

The cutoff date for temporary network diagrams to be purged. All temporary network diagrams created before this date will be purged.

If no date is specified, all temporary diagrams in the database will be purged.

Date

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network or trace network data element.

Utility Network; Trace Network

Code sample

PurgeTemporaryDiagrams example (Python window)

Purge all temporary diagrams related to a network.

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

arcpy.PurgeTemporaryDiagrams_nd(input_Network)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics