Summary
Adds a diagram rule to automatically reduce diagram edges during diagram building based on an existing template. This rule can be set up to reduce diagram edges by attributes.
Learn more about the reduction of edges in diagrams
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 or trace network service. You must use either a utility network or trace network in a file 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:
- The Input Network parameter value must be from a database connection established as the database utility network owner or database trace network owner.
- The connected ArcGIS Enterprise portal account must be the portal utility network owner or portal trace network owner.
- This tool must be connected to the default version, which is expected to be public and not protected.
The Reduce Edge rule is used to simplify the diagram graph while preserving the topology by merging each expected network line feature or edge object and all its connection points into a schematic diagram junction. This type of junction is called a reduction junction.
Any reduction junction in the resulting diagram aggregates one network line feature or edge object and all its connection points; that is, a reduction junction cannot aggregate several network line features or several edge objects.
The Reduce Edge rule is particularly useful when reducing specific network line features such as busbars.
Syntax
arcpy.nd.AddReduceEdgeByAttributeRule(in_utility_network, template_name, is_active, network_source, {where_clause}, {description}, {reconnected_edges_option})
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 rule will be enabled when generating and updating diagrams based on the specified template.
| Boolean |
network_source | The network edge source class or object table to reduce. All diagram edges related to network lines or edge objects that belong to this source class or object table are candidates for the reduction. | Table; Feature Class |
where_clause (Optional) | An SQL expression used to select the subset of network edges among the edges that are candidates for the reduction based on the input template. For more information on SQL syntax, see the SQL reference for query expressions used in ArcGIS help topic. | SQL Expression |
description (Optional) | The description of the rule. | String |
reconnected_edges_option (Optional) | Specifies whether the rule will aggregate the edges that are reconnected to the reduction junctions.
| Boolean |
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
Add a Reduce Edge By Attribute rule to the MyTemplate1 template that exists for a given network to systematically reduce any busbar distribution lines (and all their related connected junctions to a junction) in the generated diagrams.
import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"
input_EdgeLineClassToReduce = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.ElectricDistributionLine"
arcpy.AddReduceEdgeByAttributeRule_nd(input_Network, input_DiagramTemplate,
'ACTIVE', input_EdgeLineClassToReduce,
"ASSETGROUP = 1", '',
'AGGREGATE_RECONNECTED_EDGES')
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes