Summary
Adds the Mainline Tree 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 Mainline Tree Layout algorithm parameters for any diagram based on that template.
This layout algorithm arranges the junctions and edges in the input network diagram hierarchically along a main line and places its related branches on the left side, the right side, or both sides of the main line.
Learn more about the Mainline Tree 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 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
AddMainlineTreeLayout(in_utility_network, template_name, is_active, {are_containers_preserved}, {tree_direction}, {branches_placement}, {is_unit_absolute}, {perpendicular_absolute}, {perpendicular_proportional}, {along_absolute}, {along_proportional}, {disjoined_graph_absolute}, {disjoined_graph_proportional}, {are_edges_orthogonal}, {breakpoint_position}, {edge_display_type}, {offset_absolute}, {offset_proportional})
Parameter | Explanation | Data 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.
| Boolean |
are_containers_preserved (Optional) | Specifies how the algorithm will process containers.
| Boolean |
tree_direction (Optional) | Specifies the direction of the main line.
| String |
branches_placement (Optional) | Specifies how branches from the main line will be relatively placed with regard to its direction.
| String |
is_unit_absolute (Optional) | Specifies how parameters representing distances will be interpreted.
| Boolean |
perpendicular_absolute (Optional) | The spacing between diagram junctions that are displayed along the axis perpendicular to the main line. The default is 2 in the diagram's coordinate system. This parameter can only be used with absolute units. | Linear Unit |
perpendicular_proportional (Optional) | The spacing between diagram junctions that are displayed along the axis perpendicular to the main line. The default is 2. This parameter can only be used with proportional units. | Double |
along_absolute (Optional) | The spacing between diagram junctions that are displayed along the main line, as well as the spacing between diagram junctions that are displayed along the axis parallel to the main line. This parameter can only be used with absolute units. The default is 2 in the units of the diagram's coordinate system. | Linear Unit |
along_proportional (Optional) | The spacing between diagram junctions that are displayed along the main line, as well as the spacing between diagram junctions that are displayed along the axis parallel to the main line. This parameter is used with proportional units. The default is 2. | Double |
disjoined_graph_absolute (Optional) | The minimum spacing that will separate features belonging to disjoined graphs when the diagram contains such graphs. This parameter is used with absolute units. The default is 4 in the units of the diagram's coordinate system. | Linear Unit |
disjoined_graph_proportional (Optional) | The minimum spacing that will separate features belonging to disjoined graphs when the diagram contains such graphs. This parameter is used with proportional units. The default is 4. | Double |
are_edges_orthogonal (Optional) | Specifies how diagram edges that are related to the tree branches will display. Legacy:This parameter is deprecated at ArcGIS Pro 2.6. It is systematically ignored regardless of its value when the edge_display_type parameter is specified. However, to maintain compatibility with ArcGIS Pro 2.1, it remains enabled when the edge_display_type parameter is not specified.
| Boolean |
breakpoint_position (Optional) | The relative position of the break point that will be inserted along the diagram edges when Edge Display Type is Regular edges (edge_display_type = "REGULAR_EDGES" in Python) or Edge Display Type is Orthogonal edges (edge_display_type = "ORTHOGONAL_EDGES" in Python). It is a percentage between 0 and 100.
The relative position of the two inflection points that will be inserted along the diagram edges to compute the curved edges geometry when Edge Display Type is Curved edges (edge_display_type = "CURVED_EDGES" in Python). It is a percentage between 15 and 40. With a Break Point Relative Position (%) value of N between 15 and 40:
Note:The concept of the from and to junctions above is relative to the tree direction; it has nothing to do with the real topology of the edge feature or edge object in the network. | Double |
edge_display_type (Optional) | Specifies the type of display for the diagram edges related to the tree branches.
| String |
offset_absolute (Optional) | The offset used to separate overlapping segments when is_unit_absolute = "ABSOLUTE_UNIT" and edge_display_type = "ORTHOGONAL_EDGES". The value cannot exceed 10 percent of the smallest value specified for the other spacing parameters. The default is 0. | Linear Unit |
offset_proportional (Optional) | The offset used to separate overlapping segments when is_unit_absolute = "PROPORTIONAL_UNIT" and edge_display_type = "ORTHOGONAL_EDGES". It is a double value that cannot exceed 10 percent of the smallest value specified for the other spacing parameters. The default is 0. | Double |
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
This example adds the Mainline Tree Layout algorithm as an automatic layout to the MyTemplate1 template existing for a given network.
import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"
arcpy.AddMainlineTreeLayout_nd(input_Network, input_DiagramTemplate,
"ACTIVE", "PRESERVE_CONTAINERS",
"FROM_LEFT_TO_RIGHT", "BOTH_SIDES",
"ABSOLUTE_UNIT", "100 Feet", "", "100 Feet", "",
"200 Feet", "", "", 30, "ORTHOGONAL_EDGES",
"10 Feet")
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes