Summary
Compresses the diagram features toward the middle of the diagram.
Learn more about the Compression 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 in an enterprise geodatabase. You must use either the related published utility 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 trace network in a file geodatabase or a network diagram service.
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 execution.
This algorithm is useful for networks that span thousands of miles and are otherwise difficult to view and understand in their true geographic positions—for example, in the transmission utilities industry.
It is typically used on diagrams with containers so the features in the containers are processed as junction groups.
Consider applying the layout in asynchronous mode on the server when working on very large diagrams.
Syntax
ApplyCompressionLayout(in_network_diagram_layer, {are_containers_preserved}, {grouping_distance_absolute}, {vertices_removal_rule}, {run_async})
Parameter | Explanation | Data Type |
in_network_diagram_layer | The network diagram to which the layout will be applied. | Diagram Layer |
are_containers_preserved (Optional) | Specifies how containers will be processed by the Compression layout algorithm.
| Boolean |
grouping_distance_absolute (Optional) | The grouping distance is 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 execution. 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 which vertices along edges in the diagram will be removed.
| String |
run_async (Optional) | Specifies whether the layout algorithm will run asynchronously or synchronously on the server.
| Boolean |
Derived Output
Name | Explanation | Data Type |
out_network_diagram_layer | The updated network diagram layer. | Diagram Layer |
Code sample
Apply the Compression Layout algorithm to the diagram called Temporary Diagram.
import arcpy
arcpy.ApplyCompressionLayout_nd("Temporary Diagram", "PRESERVE_CONTAINERS",
"20 Feet", "OUTER", "RUN_SYNCHRONOUSLY")
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes