Reshape Diagram Edges Layout (Network Diagram)

Summary

Processes simple operations on vertices along edges.

Learn more about the Reshape Diagram Edges 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 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.

  • 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
Reshape Operation

Specifies how edges will be reshaped.

  • Remove verticesVertices along 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
Preserve path
(Optional)

Specifies whether vertices along the edges that will be squared will be preserved. This parameter is active when Reshape Operation is Square edges.

  • Checked—The 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.
  • Unchecked—Vertices along the diagram edges will not be considered, and the vertices will be removed.

Boolean
Offset Between Edges
(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 is active when Reshape Operation is Square edges.

Linear Unit
Break Point Position
(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 is active when Reshape Operation is Square edges.

Linear Unit
Offset Between Edges
(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 is active when Reshape Operation is Separate overlapping edges.

Linear Unit
Angle Threshold
(Optional)

The angle formed by the incident segments over which the vertex related to these segments will be reduced. The wider the angle, the fewer number of vertices will be reduced. The default is 160 degrees. This parameter is active when Reshape Operation 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
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

Derived Output

LabelExplanationData Type
Output Network Diagram

The updated network diagram layer.

Diagram Layer

arcpy.nd.ReshapeDiagramEdgesLayout(in_network_diagram_layer, {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}, {run_async})
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
reshape_type

Specifies how edges will be reshaped.

  • REMOVE_VERTICESVertices along 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 will be squared will be preserved. This parameter is enabled 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.
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 is enabled 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 is enabled 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 is enabled 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 will be reduced. The wider the angle, the fewer number of vertices will be reduced. The default is 160 degrees. This parameter is enabled 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
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

Derived Output

NameExplanationData Type
out_network_diagram_layer

The updated network diagram layer.

Diagram Layer

Code sample

ReshapeDiagramEdgesLayout example (Python window)

This sample script runs the ReshapeDiagramEdgesLayout function on the network diagram layer named Temporary Diagram to reduce vertices by angle.

import arcpy
arcpy.nd.ReshapeDiagramEdgesLayout("Temporary Diagram", "PRESERVE_CONTAINERS", 
                                   "REDUCE_VERTICES_BY_ANGLE", angle_threshold=160)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics