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 a network data element or layer is used as input, the tool 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 all the related diagrams (whether consistent or inconsistent), run this tool with the Update inconsistent diagrams only parameter unchecked.

  • To reapply 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 run the tool.

Parameters

LabelExplanationData Type
Input Network or Network Diagram Layer

The input network diagram layer that will be updated, or the utility network or trace network—on which the set of specified input diagram names are based—that will be updated.

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 only inconsistent diagrams (the default) or all diagrams regardless of their consistency state will be updated.

  • Checked—Only inconsistent diagrams 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 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.

  • 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 that will be updated, or the utility network or trace network—on which the set of specified input diagram names are based—that will be updated.

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 only inconsistent diagrams (the default) or all diagrams regardless of their consistency state will be updated.

  • INCONSISTENT_DIAGRAMS_ONLYOnly inconsistent diagrams 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 function.

import arcpy

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

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics