Adds the Compression layout algorithm to the layout list of the input diagram template so it automatically runs at the end of diagram buildings. This tool also presets the Compression layout algorithm parameters for any diagram based on that template.
This layout algorithm compresses the diagram features toward the middle of the diagram while trying to maintain relative positioning. It works from a distance that allows it to build junction groups that are moved as super nodes during the algorithm run.
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 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:
This tool must be connected to the default version, which is expected to be public and not protected.
To preset the layout algorithm parameters for a 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.
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 based on the input template. 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 layout algorithm will process containers.
Checked—The layout algorithm will apply to the top graph of the diagram so container layouts are preserved.
Unchecked—The layout algorithm will apply to both content and noncontent features in the diagram. This is the default.
Boolean
Maximum Distance for Grouping
(Optional)
The maximum distance that will be used to determine whether two connected junctions are close enough to be considered part of the same junctions group. A junctions group represents many junctions that are moved as a group during the layout algorithm process. The group can contain both junctions and containers. To group two junctions, they must also be connected in the diagram by an edge. The default is 20 units in the diagram's coordinate system.
Linear Unit
Vertex Removal Rule
(Optional)
Specifies the edge vertices that will be removed from the diagram.
All vertices—All edge vertices will be removed from the diagram.
All outer vertices—Any edge vertices that are within the detected junctions' groups will be maintained; edge vertices that are outside the detected junctions' groups will be removed.When containers in the diagram have edges that intersect the container polygons, a vertex will be added at the intersection of the edge and container polygon. This is the default.
All outer vertices except the first one—Any edge vertices that are within the detected junctions' groups will be maintained; edge vertices that are outside the detected junctions' groups will be removed.When containers in the diagram have edges that intersect the container polygons, the first (or last) outside vertex will be preserved on edges that intersect a container polygon. A vertex will be inserted at the intersection of the edges and container polygons.
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.
ACTIVE—The added layout algorithm will automatically run during the generation of any diagram based on the input template. 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.
INACTIVE—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
are_containers_preserved
(Optional)
Specifies how the layout algorithm will process containers.
PRESERVE_CONTAINERS—The layout algorithm will apply to the top graph of the diagram so container layouts are preserved.
IGNORE_CONTAINERS—The layout algorithm will apply to both content and noncontent features in the diagram. This is the default.
Boolean
grouping_distance_absolute
(Optional)
The maximum distance that will be used to determine whether two connected junctions are close enough to be considered part of the same junctions group. A junctions group represents many junctions that are moved as a group during the layout algorithm process. The group can contain both junctions and containers. To group two junctions, they must also be connected in the diagram by an edge. The default is 20 units in the diagram's coordinate system.
Linear Unit
vertices_removal_rule
(Optional)
Specifies the edge vertices that will be removed from the diagram.
ALL—All edge vertices will be removed from the diagram.
OUTER—Any edge vertices that are within the detected junctions' groups will be maintained; edge vertices that are outside the detected junctions' groups will be removed.When containers in the diagram have edges that intersect the container polygons, a vertex will be added at the intersection of the edge and container polygon. This is the default.
OUTER_EXCEPT_FIRST—Any edge vertices that are within the detected junctions' groups will be maintained; edge vertices that are outside the detected junctions' groups will be removed.When containers in the diagram have edges that intersect the container polygons, the first (or last) outside vertex will be preserved on edges that intersect a container polygon. A vertex will be inserted at the intersection of the edges and container polygons.
String
Derived output
Name
Explanation
Data 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
AddCompressionLayout example (Python window)
Add the Compression layout algorithm as an automatic layout to the MyTemplate1 template existing for a given network.