Summary
Adds a diagram rule to automatically reduce diagram junctions during diagram building based on an existing template. The junctions to reduce are queried from a given network junction source class or object table by attributes according to the number of other junctions to which they are connected.
Learn more about the reduction of junctions 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 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.
The Reduce Junction rule is used to simplify the diagram graph while preserving the topology.
This tool allows the configuration of the Reduce Junction rule to run by attributes. It allows the configuration of the reduction of junctions in a given network junction class or object table by filtering the junctions to reduce by their attributes according to the number of junctions they are connected to and, optionally, to particular attributes on their adjacent edges.
Syntax
AddReduceJunctionByAttributeRule(in_utility_network, template_name, is_active, junction_source, {where_clause}, {connectivity_options}, {unconnected_junctions}, {one_connected_junction}, {two_connected_junctions}, {edges_attributes}, {description})
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 |
junction_source | The network junction source class or object table to process. All diagram junctions related to network junctions that belong to this source class or object table are reduction candidates. | Table; Feature Class |
where_clause (Optional) | An SQL expression used to select the subset of network junctions from the junction reduction candidates in the diagrams 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 |
connectivity_options (Optional) | Specifies the number of junction connections that will be considered for reduction.
| String |
unconnected_junctions (Optional) | Specifies whether each unconnected network diagram junction candidate will be reduced. This parameter is only enabled when connectivity_options = "MAX_2_CONNECTED_JUNCTIONS".
| Boolean |
one_connected_junction (Optional) | Specifies whether each network diagram junction reduction candidate that is connected to a single junction will be reduced. This parameter is only enabled when connectivity_options = "MAX_2_CONNECTED_JUNCTIONS".
| Boolean |
two_connected_junctions (Optional) | Specifies whether each network diagram junction reduction candidate that is connected to two other junctions will be reduced. This parameter is only enabled when connectivity_options = "MAX_2_CONNECTED_JUNCTIONS".
| Boolean |
edges_attributes [edges_attributes,...] (Optional) | The alias of the edge attributes adjacent to the junction reduction candidate. The junction will be reduced only when all of its adjacent edges have the same values for each specified attribute alias. | String |
description (Optional) | The description of the rule. | 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
This sample script adds a Reduce Junction By Attribute rule to the MyTemplate1 template existing for a given network to systematically reduce any electric nonprotective distribution devices—that is, any device that is not a network protector or a switch—that are unconnected or connected to two other junctions in the generated diagrams.
import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"
input_JunctionClassToReduce = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.ElectricDistributionDevice"
arcpy.AddReduceJunctionByAttributeRule_un(input_Network, input_DiagramTemplate,
"ACTIVE", input_JunctionClassToReduce,
"ASSETTYPE <> 11 And ASSETTYPE <> 8",
"MAX_2_CONNECTED_JUNCTIONS",
"REDUCE_UNCONNECTED_JCT",
"KEEP_JCT_TO_1JCT","REDUCE_JCT_TO_2JCTS")
This sample script adds a Reduce Junction By Attribute rule to the MyTemplate2 template existing for a given network to systematically reduce any electric nonprotective distribution devices when they connect two other junctions and their adjacent edges have the same values for the Asset type and Phases attributes.
import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate2"
input_JunctionClassToReduce = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.ElectricDistributionDevice"
input_Alias1 = "Asset type"
input_Alias2 = "Phases"
arcpy.AddReduceJunctionByAttributeRule_nd(input_Network, input_DiagramTemplate,
"ACTIVE", input_JunctionClassToReduce,
"ASSETTYPE <> 11 And ASSETTYPE <> 8",
"MAX_2_CONNECTED_JUNCTIONS",
"KEEP_UNCONNECTED_JCT", "KEEP_JCT_TO_1JCT",
"REDUCE_JCT_TO_2JCTS",
input_Alias1 + ";" + input_Alias2)
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes