Append To Diagram (Network Diagram)

Summary

Appends network elements to a network 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 appending network elements to 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 geodatabase.

  • The input network diagram layer must be from either a utility network or a trace network in a file 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 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.

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

  • Appending network elements to subnetwork system diagrams will fail; these diagrams are exclusively maintained by the Update Subnetwork tool.

  • The Append to Diagram tool fails in the following situations:

    • There are dirty areas on network features initially used to generate the diagram, whether they are visible or aggregated.
    • There are dirty areas on container network features related to network objects initially used to generate the diagram, whether they are visible or aggregated.
    • There are dirty areas on network features appended to the diagram.
    • There are dirty areas on container network features related to network objects appended to the diagram.
    In these cases, validate the network topology to clear the dirty areas and execute the tool.

Syntax

arcpy.nd.AppendToDiagram(in_network_diagram_layer, map)
ParameterExplanationData Type
in_network_diagram_layer

The network diagram layer to which network elements will be appended.

Diagram Layer
map

The map with selected network elements to append to the network diagram.

Map

Derived Output

NameExplanationData Type
out_network_diagram_layer

The updated network diagram.

Diagram Layer

Code sample

AppendToDiagram example (Python window)

This sample script appends the network features currently selected in the active map to a diagram.

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

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics