Overwrite Diagram (Network Diagram)

Summary

Overwrites the contents of a network diagram with the network elements currently selected in the specified map. These network elements become the new initial content of the diagram.

Caution:

If you have an open edit session, you must save your edits prior to running this tool. This ensures that the diagram reflects the latest changes made to the network topology in the database. If you fail to save your edits, the edits will not be reflected in the diagram.

Learn more about overwriting network diagrams

Usage

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

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

  • The input network diagram layer and network data in the input map must share the same utility network or trace network in a file or mobile geodatabase, or the same branch version of a utility network or trace network service.

  • The All Layers mode must be enabled on the input network diagram layer.

  • Use this tool to quickly change the contents of a diagram.

  • This tool can operate on network features selected in layers and network objects selected in nonspatial tables that are referenced in the input map.

    Any nonnetwork elements that have been selected will not be included in the diagram. If only nonnetwork elements have been selected, the process fails.

  • For a temporary diagram, overwriting completely re-creates the diagram from the network elements specified as input. However, overwriting a stored diagram persists the position of the diagram features that already existed in the diagram prior to the operation.

  • Running this tool on subnetwork system diagrams will fail; these diagrams are exclusively maintained by the Update Subnetwork tool. You cannot alter this type of diagram.

  • The Overwrite Diagram tool fails in the following situations:

    • There are dirty areas on input network features used to overwrite the diagram.
    • There are dirty areas on container network features related to network objects used as input to overwrite the diagram.
    In these cases, validate the network topology to clear the dirty areas and execute the tool.

Parameters

LabelExplanationData Type
Input Network Diagram Layer

The network diagram to overwrite.

Diagram Layer
Input Map

The map referencing the set of selected network elements to use to overwrite the input network diagram.

Map

Derived Output

LabelExplanationData Type
Output Network Diagram

The updated network diagram.

Diagram Layer

arcpy.nd.OverwriteDiagram(in_network_diagram_layer, map)
NameExplanationData Type
in_network_diagram_layer

The network diagram to overwrite.

Diagram Layer
map

The map referencing the set of selected network elements to use to overwrite the input network diagram.

Map

Derived Output

NameExplanationData Type
out_network_diagram_layer

The updated network diagram.

Diagram Layer

Code sample

OverwriteDiagram example (Python window)

Overwrite a diagram with the set of network features and network objects currently selected in the active map (Map1).

import arcpy
arcpy.OverwriteDiagram_nd('Temporary Diagram', 'Map1')

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics