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 is 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 geodatabase.

  • The input network diagram layer must be from either a utility network or a trace network in a file geodatabase or a network diagram service.

  • 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.

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

Syntax

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})
ParameterExplanationData 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 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
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 when executing 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 its execution exceeds the service time-out: 600 seconds by default. 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 executes the Reshape Diagram Edges layout algorithm on the network diagram layer named Temporary Diagram to reduce vertices by angle.

import arcpy
arcpy.ReshapeDiagramEdgesLayout_nd("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