Update Diagram (Network Diagram)

Summary

Updates one or more network diagrams that are related to a given utility network or trace network.

Diagrams may need to be updated when they are either inconsistent or consistent. When a diagram is inconsistent, it means the network elements associated with some diagram features have been altered, and the diagram is out of date. A consistent diagram may need to be updated if the diagram template associated with it has been modified.

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 updating 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 or network diagram layer must be from either a utility network or trace network in a file or mobile geodatabase, or a utility network or trace network service.

  • If both the Input Template Names and Input Diagram Names parameters are specified, the process will fail if the diagrams with the specified names are based on a different template name.

  • If the tool takes a network data element or layer as input, it requires either a list of diagram names to update or a specific diagram template (all the related diagrams are updated).

  • By default, this tool only processes inconsistent diagrams. To reflect changes that may have impacted the template rule and layout definitions, and therefore all the related diagrams (whether consistent or inconsistent), run this tool with the Update inconsistent diagrams only parameter unchecked.

  • To force the reexecution of automatic layouts at the end of the diagram update, you must check the Re-apply automatic layouts on the updated diagrams parameter.

  • Attempting to update subnetwork system diagrams will fail; these diagrams are exclusively maintained by the Update Subnetwork tool.

  • The Update 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 new network features processed during the update.
    • There are dirty areas on container network features related to new network objects processed during the update.
    In these cases, validate the network topology to clear the dirty areas and execute the tool.

Parameters

LabelExplanationData Type
Input Network or Network Diagram Layer

The input network diagram layer to update or the utility network or trace network on which the set of specified input diagram names are based to update.

Utility Network Layer; Trace Network Layer; Utility Network; Trace Network; Diagram Layer
Template Names
(Optional)

The names of the templates for which the related diagrams will be processed.

String
Diagram Names
(Optional)

The names of the diagrams to be processed.

String
Update inconsistent diagrams only
(Optional)

Specifies whether to update only diagrams that are inconsistent (the default) or all diagrams regardless of their consistency state.

  • Checked—Only diagrams that are inconsistent will be updated. This is the default.
  • Unchecked—Both consistent and inconsistent diagrams will be updated.
Boolean
Re-apply automatic layouts on the updated diagrams
(Optional)

Specifies whether automatic layouts that may be configured on the template on which the diagrams are based will be reapplied during the update process. By default, when automatic layouts are specified on a template, they are not reapplied during the update process.

  • Checked—The automatic layouts that are configured on the template will be reapplied to diagrams at the end of the update process.
  • Unchecked—None of the automatic layouts configured on the template will be reapplied to diagrams during the update process. This is the default.

Boolean

Derived Output

LabelExplanationData Type
Output Network or Network Diagram Layer

The updated network diagram, utility network or trace network.

Utility Network Layer; Trace Network Layer; Utility Network; Trace Network; Diagram Layer

arcpy.nd.UpdateDiagram(in_diagrams, {template_names}, {diagram_names}, {update_option}, {autolayout_option})
NameExplanationData Type
in_diagrams

The input network diagram layer to update or the utility network or trace network on which the set of specified input diagram names are based to update.

Utility Network Layer; Trace Network Layer; Utility Network; Trace Network; Diagram Layer
template_names
[templatenames,...]
(Optional)

The names of the templates for which the related diagrams will be processed.

String
diagram_names
[diagram_names,...]
(Optional)

The names of the diagrams to be processed.

String
update_option
(Optional)

Specifies whether to update only diagrams that are inconsistent (the default) or all diagrams regardless of their consistency state.

  • INCONSISTENT_DIAGRAMS_ONLYOnly diagrams that are inconsistent will be updated. This is the default.
  • ALL_SELECTED_DIAGRAMSBoth consistent and inconsistent diagrams will be updated.
Boolean
autolayout_option
(Optional)

Specifies whether automatic layouts that are configured on the template on which the diagrams are based will be reapplied during the update process. By default, when automatic layouts are specified on a template, they are not reapplied during the update process.

  • REAPPLY_AUTOLAYOUTThe automatic layouts that are configured on the template will be reapplied to diagrams at the end of the update process.
  • DO_NOT_REAPPLY_AUTOLAYOUTNone of the automatic layouts configured on the template will be reapplied to diagrams during the update process. This is the default.
Boolean

Derived Output

NameExplanationData Type
out_diagrams

The updated network diagram, utility network or trace network.

Utility Network Layer; Trace Network Layer; Utility Network; Trace Network; Diagram Layer

Code sample

UpdateDiagram example (Python window)

Update all inconsistent diagrams based on a given template using the UpdateDiagram tool.

import arcpy

input_Network = "https://cezembre.esri.com/server/rest/services/Naperville2_Electric_SQL/FeatureServer/0"
input_TemplateName = "Basic"
arcpy.UpdateDiagram_nd(input_Network, input_TemplateName)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics