Apply Template Layouts (Network Diagram)

Summary

Applies the list of layout algorithms currently configured for the diagram template to the input network diagram layer.

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.

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.

  • This layout algorithm can be used to rerun the list of layout algorithms currently configured on the template on which the input network diagram is based. This tool is useful when a diagram has been edited and you want to restore the layout to its original state.

  • In some situations, the resulting layout can be similar to the one obtained when the diagram was generated. It will never be exactly the same because the new geometry for the diagram elements is computed based on the current geometry of the diagram elements, not the initial geographic geometry from diagram generation.

    There are some situations in which the resulting diagram layout will be completely different from the one at generation. For example, the template is configured to run an algorithm that preserves the geographical positions of the network features (for example, Square Edges or Partial Overlapping Edges). If you completely overwrite those positions by manually running a tree layout—Smart Tree, Main Line Tree, or Radial Tree—for the diagram, the layout will be quite different after running Apply Template Layouts.

Parameters

LabelExplanationData Type
Input Network Diagram Layer

The network diagram to which the layout will be applied.

Diagram Layer

Derived Output

LabelExplanationData Type
Output Network Diagram

The updated network diagram layer.

Diagram Layer

arcpy.nd.ApplyTemplateLayouts(in_network_diagram_layer)
NameExplanationData Type
in_network_diagram_layer

The network diagram to which the layout will be applied.

Diagram Layer

Derived Output

NameExplanationData Type
out_network_diagram_layer

The updated network diagram layer.

Diagram Layer

Code sample

ApplyTemplateLayouts example (Python window)

Run the ApplyTemplateLayouts function on the diagram called Temporary Diagram.

import arcpy
arcpy.nd.ApplyTemplateLayouts("Temporary Diagram")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics