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.

Learn about purging temporary diagrams

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:

  • 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

arcpy.nd.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