Add Main Ring Layout (Network Diagram)

Summary

Adds the Main Ring Layout algorithm to the list of layouts to be automatically chained at the end of the building of diagrams based on a given template. This tool also presets the Main Ring Layout algorithm parameters for any diagram based on that template.

This layout algorithm arranges the diagram features around the main ring and hierarchically lays out the subset of diagram features that connect to each diagram junction placed along the main ring.

Learn more about the Main Ring layout algorithm

Caution:

This tool is a configuration and administration tool.

Note:

This tool impacts the consistency of any existing diagrams based on the input diagram template. All of the existing diagrams become inconsistent and open with a consistency warning icon May be inconsistent until they are updated.

Usage

  • This tool is not supported when working with a utility network or trace network service. You must use either a utility network or trace network in a file or mobile geodatabase, or a database connection to a utility network or trace network in an enterprise geodatabase. When working with an enterprise geodatabase the following are requirements:

  • To preset the layout algorithm parameters for any diagram based on the diagram template, uncheck the Active parameter (is_active = "INACTIVE" in Python).

  • Run the tool with Active checked (is_active = "ACTIVE" in Python) if you want the layout algorithm to be added to the list of layouts that will be automatically chained at the end of diagram generation based on the input diagram template.

Parameters

LabelExplanationData Type
Input Network

The utility network or trace network containing the diagram template that will be modified.

Utility Network; Trace Network
Input Diagram Template

The name of the diagram template that will be modified.

String
Active

Specifies whether the layout algorithm will automatically run when generating diagrams based on the specified template.

  • Checked—The added layout algorithm will automatically run during the generation of any diagram that is based on the Input Diagram Template parameter value. This is the default.

    The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.

  • Unchecked—All the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.

Boolean
Preserve container layout
(Optional)

Specifies how the algorithm will process containers.

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

Boolean
Ring Type
(Optional)

Specifies the type of ring.

  • EllipseThe diagram features of the detected main ring will display along an ellipse. This is the default.
  • RectangleThe diagram features of the detected main ring will display along a rectangle.
String
Spacing values interpreted as absolute units in the diagram coordinate system
(Optional)

Specifies how parameters representing distances will be interpreted.

  • Checked—The layout algorithm will interpret any distance values as linear units.
  • Unchecked—The layout algorithm will interpret any distance values as relative units to an estimation of the average of the junction sizes in the current diagram extent. This is the default.

Boolean
Ring Width
(Optional)

The width of the ring. The default is in the units of the diagram's coordinate system. This parameter can only be used with absolute units.

Linear Unit
Ring Width
(Optional)

The width of the ring. The default is 50. This parameter can only be used with proportional units.

Double
Ring Height
(Optional)

The height of the ring. The default is in the units of the diagram's coordinate system. This parameter can only be used with absolute units.

Linear Unit
Ring Height
(Optional)

The height of the ring. The default is 20. This parameter can only be used with proportional units.

Double
Hierarchical Tree Type
(Optional)

Specifies how the trees coming out of the main ring's junctions will be positioned.

  • Both sides of main line treeEach tree will be displayed along a main line, and its related branches will be arranged on both the left and right sides of this main line.
  • Left side of main line treeEach tree will be displayed hierarchically along a main line, and its related branches will be arranged on the left side of this main line.
  • Right side of main line treeEach tree will be displayed hierarchically along a main line, and its related branches will be arranged on the right side of this main line.
  • Smart treeEach tree will be displayed hierarchically as a smart tree. This is the default.
String
Between Junctions Perpendicular to the Direction
(Optional)

The spacing between diagram junctions that are displayed perpendicular to the tree direction and belong to the same subtree level. The default is 2 in the units of the diagram's coordinate system. This parameter can only be used with absolute units.

Linear Unit
Between Junctions Perpendicular to the Direction
(Optional)

The spacing between diagram junctions that are displayed perpendicular to the tree direction and belong to the same subtree level. The default is 2. This parameter can only be used with proportional units.

Double
Between Junctions Along the Direction
(Optional)

The spacing between diagram junctions that are displayed along the tree direction. The default is 2 in the units of the diagram's coordinate system. This parameter can only be used with absolute units.

Linear Unit
Between Junctions Along the Direction
(Optional)

The spacing between diagram junctions that are displayed along the tree direction. The default is 2. This parameter can only be used with proportional units.

Double
Break Point Relative Position (%)
(Optional)

The relative position of the break point that will be inserted along the diagram edges when Edge Display Type is set to Regular edges (edge_display_type = "REGULAR_EDGES" in Python) or Edge Display Type is set to Orthogonal edges (edge_display_type = "ORTHOGONAL_EDGES" in Python). 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 inflection points that will be inserted along the diagram edges to compute the curved edges geometry when Edge Display Type is set to Curved edges (edge_display_type = "CURVED_EDGES" in Python). 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 inflection point will be positioned at N% of the length of the [XY] segment.
    • The second inflection 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 inflection point will be positioned at N% of the length of the [YX] segment.
    • The second inflection point will be positioned at (100 - N)% of the length of the [XY] segment.

Note:

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

Double
Edge Display Type
(Optional)

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

  • Regular edgesAll diagram edges related to the tree branches will 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
Absolute Offset
(Optional)

The offset that will be used to separate overlapping segments when using absolute units and Edge Display Type is set to Orthogonal edges. The value cannot exceed 10 percent of the smallest value specified for the other spacing parameters. The default is 0.

Linear Unit
Proportional Offset
(Optional)

The offset that will be used to separate overlapping segments when using proportional units and Edge Display Type is set to Orthogonal edges. It is a double value that cannot exceed 10 percent of the smallest value specified for the other spacing parameters. The default is 0.

Double

Derived Output

LabelExplanationData Type
Output Network

The updated utility network or trace network.

Utility Network; Trace Network
Output Diagram Template

The name of the diagram template.

String

arcpy.nd.AddMainRingLayout(in_utility_network, template_name, is_active, {are_containers_preserved}, {ring_type}, {is_unit_absolute}, {ring_width_absolute}, {ring_width_proportional}, {ring_height_absolute}, {ring_height_proportional}, {tree_type}, {perpendicular_absolute}, {perpendicular_proportional}, {along_absolute}, {along_proportional}, {breakpoint_position}, {edge_display_type}, {offset_absolute}, {offset_proportional})
NameExplanationData Type
in_utility_network

The utility network or trace network containing the diagram template that will be modified.

Utility Network; Trace Network
template_name

The name of the diagram template that will be modified.

String
is_active

Specifies whether the layout algorithm will automatically run when generating diagrams based on the specified template.

  • ACTIVEThe added layout algorithm will automatically run during the generation of any diagram that is based on the template_name parameter value. This is the default.The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.
  • INACTIVEAll the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.
Boolean
are_containers_preserved
(Optional)

Specifies how the algorithm will process containers.

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

Specifies the type of ring.

  • ELLIPSEThe diagram features of the detected main ring will display along an ellipse. This is the default.
  • RECTANGLEThe diagram features of the detected main ring will display along a rectangle.
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 current diagram extent. This is the default.
Boolean
ring_width_absolute
(Optional)

The width of the ring. The default is in the units of the diagram's coordinate system. This parameter can only be used with absolute units.

Linear Unit
ring_width_proportional
(Optional)

The width of the ring. The default is 50. This parameter can only be used with proportional units.

Double
ring_height_absolute
(Optional)

The height of the ring. The default is in the units of the diagram's coordinate system. This parameter can only be used with absolute units.

Linear Unit
ring_height_proportional
(Optional)

The height of the ring. The default is 20. This parameter can only be used with proportional units.

Double
tree_type
(Optional)

Specifies how the trees coming out of the main ring's junctions will be positioned.

  • BOTH_SIDESEach tree will be displayed along a main line, and its related branches will be arranged on both the left and right sides of this main line.
  • LEFT_SIDEEach tree will be displayed hierarchically along a main line, and its related branches will be arranged on the left side of this main line.
  • RIGHT_SIDEEach tree will be displayed hierarchically along a main line, and its related branches will be arranged on the right side of this main line.
  • SMART_TREEEach tree will be displayed hierarchically as a smart tree. This is the default.
String
perpendicular_absolute
(Optional)

The spacing between diagram junctions that are displayed perpendicular to the tree direction and belong to the same subtree level. The default is 2 in the units of the diagram's coordinate system. This parameter can only be used with absolute units.

Linear Unit
perpendicular_proportional
(Optional)

The spacing between diagram junctions that are displayed perpendicular to the tree direction and belong to the same subtree level. The default is 2. This parameter can only be used with proportional units.

Double
along_absolute
(Optional)

The spacing between diagram junctions that are displayed along the tree direction. The default is 2 in the units of the diagram's coordinate system. This parameter can only be used with absolute units.

Linear Unit
along_proportional
(Optional)

The spacing between diagram junctions that are displayed along the tree direction. The default is 2. This parameter can only be used with proportional units.

Double
breakpoint_position
(Optional)

The relative position of the break point that will be inserted along the diagram edges when Edge Display Type is set to Regular edges (edge_display_type = "REGULAR_EDGES" in Python) or Edge Display Type is set to Orthogonal edges (edge_display_type = "ORTHOGONAL_EDGES" in Python). 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 inflection points that will be inserted along the diagram edges to compute the curved edges geometry when Edge Display Type is set to Curved edges (edge_display_type = "CURVED_EDGES" in Python). 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 inflection point will be positioned at N% of the length of the [XY] segment.
    • The second inflection 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 inflection point will be positioned at N% of the length of the [YX] segment.
    • The second inflection point will be positioned at (100 - N)% of the length of the [XY] segment.

Note:

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

Double
edge_display_type
(Optional)

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

  • REGULAR_EDGESAll diagram edges related to the tree branches will 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
offset_absolute
(Optional)

The offset that will be used to separate overlapping segments when is_unit_absolute = "ABSOLUTE_UNIT" and edge_display_type = "ORTHOGONAL_EDGES". The value cannot exceed 10 percent of the smallest value specified for the other spacing parameters. The default is 0.

Linear Unit
offset_proportional
(Optional)

The offset that will be used to separate overlapping segments when is_unit_absolute = "PROPORTIONAL_UNIT" and edge_display_type = "ORTHOGONAL_EDGES". It is a double value that cannot exceed 10 percent of the smallest value specified for the other spacing parameters. The default is 0.

Double

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network or trace network.

Utility Network; Trace Network
out_template_name

The name of the diagram template.

String

Code sample

AddMainRingLayout example (Python window)

Add the Main Ring Layout algorithm as an automatic layout to the MyTemplate1 template related to the input network.

import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"

arcpy.AddMainRingLayout_nd(input_Network, "MyTemplate1", "ACTIVE", 
                           "PRESERVE_CONTAINERS", "ELLIPSE", 
                           "PROPORTIONAL_UNIT", "", 50, "", 20, "SMART_TREE", 
                           "", 2, "", 2, 30, "CURVED_EDGES")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics