Apply Rotate Tree Layout (Network Diagram)

Summary

Rotates the tree or trees related to pivot junctions currently set up in a diagram to the specified angle.

Learn more about the Rotate Tree layout algorithm

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.

Note:

Each layout algorithm includes default parameter values. The default parameter values will be used unless otherwise specified. If the input network diagram is based on a template for which this layout has been configured with a different parameter value, that value will be used instead.

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 rotates one or more trees related to the pivot junctions currently set up in the input network diagram layer according to the specified angle.

  • The Rotate Tree algorithm requires at least one pivot junction, such as a junction used as the center point around which the related graph will be rotated. The Rotate Tree layout also takes into account any barriers in the input diagram layer to prevent the algorithm from running beyond the barriers.

  • When running the tool with the Rotate junction symbols with the same angle parameter checked, the Angle parameter value will be added to the value of the rotation field for each processed diagram junction.

  • Consider applying the layout in asynchronous mode on the server when working on very large diagrams.

Parameters

LabelExplanationData Type
Input Network Diagram Layer

The network diagram to which the layout will be applied.

Diagram Layer
Preserve container layout
(Optional)

Specifies how the algorithm will process containers.

  • Checked—The layout algorithm will apply to the top graph of the diagram so containers are preserved.
  • Unchecked—The layout algorithm will apply to both content and noncontent features in the diagram. This is the default.

Boolean
Angle
(Optional)

The angle in degrees that will be used to rotate the tree. The default is 45 degrees.

Double
Run in asynchronous mode on the server
(Optional)

Specifies whether the layout algorithm will run asynchronously or synchronously on the server.

  • Checked—The layout algorithm will run asynchronously on the server. This option dedicates server resources to run the layout algorithm with a longer time-out. Running asynchronously is recommended for layouts that are time consuming and may exceed the server time-out (for example, Partial Overlapping Edges) and applying to large diagrams (more than 25,000 features).
  • Unchecked—The layout algorithm will run synchronously on the server. It can fail without completion if it exceeds the service default time-out value of 600 seconds. This is the default.

Boolean
Rotate junction symbols with the same angle
(Optional)

Specifies whether the Angle parameter value will be added to the value of the rotation field for each processed diagram junction.

  • Checked—The Angle parameter value will be added to the value of the rotation field for each processed diagram junction.
  • Unchecked—The Angle parameter value will not be added to the value of the rotation field. This is the default.

Boolean

Derived Output

LabelExplanationData Type
Output Network Diagram

The updated network diagram layer.

Diagram Layer

arcpy.nd.ApplyRotateTreeLayout(in_network_diagram_layer, {are_containers_preserved}, {rotation_angle}, {run_async}, {rotate_junction})
NameExplanationData Type
in_network_diagram_layer

The network diagram to which the layout will be applied.

Diagram Layer
are_containers_preserved
(Optional)

Specifies how the algorithm will process containers.

  • PRESERVE_CONTAINERS The layout algorithm will apply to the top graph of the diagram so containers are preserved.
  • IGNORE_CONTAINERSThe layout algorithm will apply to both content and noncontent features in the diagram. This is the default.
Boolean
rotation_angle
(Optional)

The angle in degrees that will be used to rotate the tree. The default is 45 degrees.

Double
run_async
(Optional)

Specifies whether the layout algorithm will run asynchronously or synchronously on the server.

  • RUN_ASYNCHRONOUSLYThe layout algorithm will run asynchronously on the server. This option dedicates server resources to run the layout algorithm with a longer time-out. Running asynchronously is recommended for layouts that are time consuming and may exceed the server time-out (for example, Partial Overlapping Edges) and applying to large diagrams (more than 25,000 features).
  • RUN_SYNCHRONOUSLYThe layout algorithm will run synchronously on the server. It can fail without completion if it exceeds the service default time-out value of 600 seconds. This is the default.
Boolean
rotate_junction
(Optional)

Specifies whether the rotation_angle parameter value will be added to the value of the rotation field for each processed diagram junction.

  • ROTATEThe rotation_angle parameter value will be added to the value of the rotation field for each processed diagram junction.
  • DO_NOT_ROTATEThe rotation_angle parameter value will not be added to the value of the rotation field. This is the default.
Boolean

Derived Output

NameExplanationData Type
out_network_diagram_layer

The updated network diagram layer.

Diagram Layer

Code sample

ApplyRotateTreeLayout example (Python window)

This sample script applies a 90-degree Rotate Tree layout to the diagram called Temporary Diagram while preserving the geometry of any content features.

import arcpy
arcpy.nd.ApplyRotateTreeLayout("Temporary Diagram", "PRESERVE_CONTAINERS", 90, 
                               "RUN_SYNCHRONOUSLY", "ROTATE")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics