Skip To Content

Apply Smart Tree Layout

Summary

Arranges diagram features hierarchically and places them in a smart tree.

Caution:

If you have an open edit session, you must save your edits prior to running this tool. This ensures 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 is used instead.

Usage

  • This layout algorithm arranges the diagram features hierarchically and places them in a smart tree according to the direction and spacing distances specified.

  • When a root junction is specified in the diagram, the Smart Tree Layout algorithm builds a smart tree starting from that junction.

    When several root junctions are specified in the diagram, those root junctions are aligned along the same axis perpendicularly to the tree direction and appear as different start points for a tree branch of the diagram.

    If no root junction is specified, the algorithm selects the diagram junction associated with the smallest utility network topology index and considers this junction the root junction.

Syntax

ApplySmartTreeLayout_un (in_network_diagram_layer, {are_containers_preserved}, {tree_direction}, {is_unit_absolute}, {subtree_absolute}, {subtree_proportional}, {perpendicular_absolute}, {perpendicular_proportional}, {along_absolute}, {along_proportional}, {disjoined_graph_absolute}, {disjoined_graph_proportional}, {are_edges_orthogonal}, {breakpoint_position}, {edge_display_type})
ParameterExplanationData Type
in_network_diagram_layer

The network diagram where the layout will be applied.

Diagram Layer
are_containers_preserved
(Optional)

Specifies how containers will be processed by the algorithm.

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

The direction of the tree.

  • FROM_LEFT_TO_RIGHTThe tree will be drawn from left to right. This is the default.
  • FROM_RIGHT_TO_LEFTThe tree will be drawn from right to left.
  • FROM_BOTTOM_TO_TOPThe tree will be drawn from bottom to top.
  • FROM_TOP_TO_BOTTOMThe tree will be drawn from top to bottom.
String
is_unit_absolute
(Optional)

Specifies how parameters representing distances will be interpreted.

  • ABSOLUTE_UNITThe layout algorithm will interpret any distance values as linear units.
  • PROPORTIONAL_UNITThe layout algorithm will interpret any distance values as relative units to an estimation of the average of the junction sizes in the diagram when it is generated. This is the default.
Boolean
subtree_absolute
(Optional)

Determines the spacing between two neighboring subtrees; that is, the spacing between diagram junctions that are displayed perpendicular to the smart tree direction and belong to a different subtree. The default is in the units of the diagram's coordinate system. This parameter is required when using absolute units.

Linear Unit
subtree_proportional
(Optional)

Determines the spacing between two neighboring subtrees; that is, the spacing between diagram junctions that are displayed perpendicular to the smart tree direction and belong to a different subtree. The default is 2. This parameter is required when using proportional units.

Double
perpendicular_absolute
(Optional)

Specifies the spacing between diagram junctions that are displayed perpendicular to the smart tree direction and belong to the same subtree level. The default is 2 in the units of the diagram's coordinate system. This parameter is required when using absolute units.

Linear Unit
perpendicular_proportional
(Optional)

Specifies the spacing between diagram junctions that are displayed perpendicular to the smart tree direction and belong to the same subtree level. The default is 2. This parameter is required when using proportional units.

Double
along_absolute
(Optional)

Specifies the spacing between diagram junctions that are displayed along the smart tree direction. The default is 2 in the units of the diagram's coordinate system. This parameter is required when using absolute units.

Linear Unit
along_proportional
(Optional)

Specifies the spacing between diagram junctions that are displayed along the smart tree direction. The default is 2. This parameter is required when using proportional units.

Double
disjoined_graph_absolute
(Optional)

The minimum spacing that must separate features belonging to disjoined graphs when the diagram contains such graphs. This parameter is required when using absolute units. The default is 4 in the units of the diagram's coordinate system.

Linear Unit
disjoined_graph_proportional
(Optional)

The minimum spacing that must separate features belonging to disjoined graphs when the diagram contains such graphs. This parameter is required when using proportional units. The default is 4.

Double
are_edges_orthogonal
(Optional)

Specifies how diagram edges that are related to the tree branches display.

Legacy:

This parameter is deprecated at ArcGIS Pro 2.3. It is systematically ignored regardless of its value when the edge_display_type is specified. However, to maintain compatibility with ArcGIS Pro 2.1, it remains enabled when the edge_display_type parameter is not specified.

  • ORTHOGONAL_EDGESAll diagram edges related to the tree branches will display with right angles.
  • SLANTED_EDGESAll diagram edges related to the tree branches do not display with right angles. This is the default.
Boolean
breakpoint_position
(Optional)

The relative position of the break point that will be inserted along the diagram edges when edge_display_type = REGULAR_EDGES or edge_display_type = ORTHOGONAL_EDGES. It is a percentage between 0 and 100.

  • With a Break Point Relative Position (%) value of 0, the break point is positioned at the x-coordinate of the edge's from junction and at the y-coordinate of the edge's to junction for a horizontal tree. It is positioned at the y-coordinate of the edge's from junction and at the x-coordinate of the edge's to junction for a vertical tree.
  • With a Break Point Relative Position (%) value of 100, there is no break point inserted on the diagram edges; each diagram edge directly connects its from and to junctions.
  • With a Break Point Relative Position (%) value of N between 0 and 100, the break point is positioned at N% of the length of the [XY] segment, X being the x-coordinate of the edge's from junction and Y being the y-coordinate of the edge's to junction for a horizontal tree. It is positioned at N% of the length of the [YX] segment, Y being the y-coordinate of the edge's from junction and X being the x-coordinate of the edge's to junction for a vertical tree.

The relative position of the two inflexion points that will be inserted along the diagram edges to compute the curved edges geometry when edge_display_type = CURVED_EDGES. It is a percentage between 15 and 40. With a Break Point Relative Position (%) value of N between 15 and 40:

  • X being the x-coordinate of the edge's from junction and Y being the y-coordinate of the edge's to junction for a horizontal tree:
    • The first inflexion point will be positioned at N% of the length of the [XY] segment.
    • The second inflexion point will be positioned at (100 - N)% of the length of the [XY] segment.
  • Y being the y-coordinate of the edge's from junction and X being the x-coordinate of the edge's to junction for a vertical tree:
    • The first inflexion point will be positioned at N% of the length of the [YX] segment.
    • The second inflexion point will be positioned at (100 - N)% of the length of the [XY] segment.

Note:

The notion of the from and to junctions above is relative to the tree direction; it has nothing to do with the real topology of the network feature edge.

Double
edge_display_type
(Optional)

The type of display for the diagram edges related to the tree branches.

  • REGULAR_EDGESAll diagram edges related to the tree branches do not display with right angles. This is the default.
  • ORTHOGONAL_EDGESAll diagram edges related to the tree branches will display with right angles.
  • CURVED_EDGESAll diagram edges related to the tree branches will be curved.
String

Derived Output

NameExplanationData Type
out_network_diagram_layer

The updated network diagram layer.

Diagram Layer

Code sample

ApplySmartTreeLayout example (Python window)

This sample applies the Smart Tree Layout algorithm to the diagram called Temporary Diagram.

import arcpy
arcpy.ApplySmartTreeLayout_un("Temporary Diagram", "PRESERVE_CONTAINERS", 
                              "FROM_LEFT_TO_RIGHT", "PROPORTIONAL_UNIT", 
                              "", 8, "", 5, "", 5, "", 15, "", 70, "REGULAR_EDGES")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics