Summary
Purges temporary network diagrams related to a given utility network or trace network.
Caution:
This tool is an 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:
- The Input Network parameter value must be from a database connection established as the database utility network owner or database trace network owner.
- The connected ArcGIS Enterprise portal account must be the portal utility network owner or portal trace network owner.
- This tool must be connected to the default version, which is expected to be public and not protected.
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})
Parameter | Explanation | Data 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
Name | Explanation | Data Type |
out_utility_network | The updated utility network or trace network data element. | Utility Network; Trace Network |
Code sample
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
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes