Add Reshape Diagram Edges Layout (Network Diagram)

Summary

Adds the Reshape Diagram Edges 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 Reshape Diagram Edges Layout algorithm parameters for any diagram based on that template.

This layout is used to process simple operations on vertices along edges in network diagrams. It allows you to do the following:

  • Remove all vertices along diagram edges.
  • Reduce some vertices along diagram edges.
  • Square diagram edges with the addition of vertices on edges.
  • Separate diagram edges that overlap.
  • Detect diagram edges that cross each other at right angles and reshape their geometries to display a circular arc at the crossing locations.

Learn more about the Reshape Diagram Edges 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 service. You must work with either a utility network or trace network in a file geodatabase or a database connection to a utility network in an enterprise geodatabase. When working with an enterprise geodatabase, the connection must be established as the database utility network owner.

  • When performing this operation on a utility network in an enterprise geodatabase, the connected ArcGIS Enterprise portal account must be the portal utility network owner.

  • The network data element specified for the input network parameter must be from either a utility network or trace network in a file geodatabase or a database connection to a utility network in an enterprise geodatabase.

  • 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 (the default) (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.

Syntax

AddReshapeDiagramEdgesLayout(in_utility_network, template_name, is_active, {are_containers_preserved}, reshape_type, {is_path_preserved}, {offset_between_segment_absolute}, {breakpoint_absolute}, {shift_between_edge_absolute}, {angle_threshold}, {circular_arc_radius}, {circular_arc_position})
ParameterExplanationData Type
in_utility_network

The utility network or trace network containing the diagram template to modify.

Utility Network; Trace Network
template_name

The name of the diagram template to modify.

String
is_active

Specifies whether the layout algorithm will automatically execute 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. 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
reshape_type

Specifies how edges will be reshaped.

  • REMOVE_VERTICESVertices along any edges in the diagram will be removed.
  • SQUARE_EDGESVertices will be placed along diagram edges, and the edges will be displayed with right angles. This is the default.
  • SEPARATE_OVERLAPPING_EDGESEdges that connect the same origin and extremity junctions will be separated when they are overlapping.
  • REDUCE_VERTICES_BY_ANGLESome or all vertices displayed along diagram edges will be reduced according to the angle that separates the segments incident to those vertices.
  • MARK_CROSSING_EDGESThe horizontal and vertical diagram edges that cross each other at a right angle in the diagram will be marked, and the geometry of one of the crossing edges will be reshaped to display a circular arc at this location.
String
is_path_preserved
(Optional)

Specifies whether vertices along the edges that are going to be squared will be preserved. This parameter can only be used when reshape_type is SQUARE_EDGES.

  • PRESERVE_PATHThe direction of any edge will be considered, and vertices along that edge will be preserved from the first vertex to the last. This is the default.
  • IGNORE_PATHVertices along the diagram edges will not be considered, and the vertices will be removed during execution.
Boolean
offset_between_segment_absolute
(Optional)

The spacing that will separate parallel segments of squared edges incident to the same junction. The default is 5 in the units of the diagram's coordinate system. This parameter can only be used when reshape_type is SQUARE_EDGES.

Linear Unit
breakpoint_absolute
(Optional)

The maximum distance between each junction to the first or last break point along edges incident to that junction when those edges are squared. The default is 8.66 in the units of the diagram's coordinate system. This parameter can only be used when reshape_type is SQUARE_EDGES.

Linear Unit
shift_between_edge_absolute
(Optional)

The absolute spacing that will separate two edges. The default is 0.5 in the units of the diagram's coordinate system. This parameter can only be used when reshape_type is SEPARATE_OVERLAPPING_EDGES.

Linear Unit
angle_threshold
(Optional)

The angle formed by the incident segments over which the vertex related to these segments is reduced. The wider the angle, the fewer number of vertices will be reduced. The default is 160 degrees. This parameter can only be used when reshape_type is REDUCE_VERTICES_BY_ANGLE.

Double
circular_arc_radius
(Optional)

The radius of the circular arc that will be added to the crossing edge locations. The default is 5.

Linear Unit
circular_arc_position
(Optional)

Specifies the segment on which a circular arc will be placed.

  • LEFT_OF_VERTICAL_SEGMENTA circular arc will be placed to the left of the vertical segment.
  • RIGHT_OF_VERTICAL_SEGMENTA circular arc will be placed to the right of the vertical segment.
  • ABOVE_HORIZONTAL_SEGMENTA circular arc will be placed above the horizontal segment.
  • BELOW_HORIZONTAL_SEGMENTA circular arc will be placed below the horizontal segment.
String

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

AddReshapeDiagramEdgesLayout example (Python window)

Add the Reshape Diagram Edges layout algorithm as an automatic layout to the MyTemplate1 template existing for a given network to systematically square edges in the generated diagrams.

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

arcpy.AddReshapeDiagramEdgesLayout_nd(input_Network, input_DiagramTemplate, 
                                      "ACTIVE", "PRESERVE_CONTAINERS", 
                                      "SQUARE_EDGES", "PRESERVE_PATH", "5 Feet", 
                                      "8.66 Feet")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics