Summary
Adds a diagram rule to automatically reduce diagram junctions during diagram building based on an existing template. This tool reduces junctions based on several network junction source classes and object tables 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 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 Junction rule is used to simplify the diagram graph while preserving the topology.
This tool allows the configuration of a Reduce Junction rule to reduce junctions based on different network junction classes and object tables according to the number of their adjacent junctions—that is, the number of junctions to which they are connected and, optionally, to particular attributes on their adjacent edges.
You can configure this tool to reduce either all diagram features that are based on specified network junction source classes and object tables or all diagram features except those based on the specified network junction source classes and object tables.
When this tool is configured with Rule Process set to Exclude source classes (rule_process = "EXCLUDE_SOURCE_CLASSES" in Python) and no junction source classes or object tables are specified, it works on each junction in the processed diagram regardless of its junction source class or object table. It can be configured to reduce all unconnected junctions in the diagrams, for example.
By default, this tool is configured with Rule Process set to Include source classes (rule_process = "INCLUDE_SOURCE_CLASSES" in Python) and expects one or more junction source classes or object tables to be processed.
When the SystemJunctions class exists among the specified Junction Sources parameter (junction_source in Python) values, the rule is systematically applied to both system junctions and system junction objects.
Syntax
arcpy.nd.AddReduceJunctionRule(in_utility_network, template_name, is_active, {inverse_source_selection}, {junction_source}, {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 |
inverse_source_selection (Optional) | Specifies how the specified junction source classes and object tables will be processed.
| String |
junction_source [junction_source,...] (Optional) | A list of the network junction source class (or classes) and object table (or tables) that will be excluded or included depending on the rule process. When Rule Process is set to Include source classes (inverse_source_selection = "INCLUDE_SOURCE_CLASSES" in Python), the default, one or more network junction source classes or object tables will be processed. All diagram junctions related to network junctions that belong to those source classes and object tables are reduction candidates. Note:The Add Reduce Junction Rule tool will process the junction source classes and object tables in the order of this list, from the junction class or table with the highest priority—the first class or table in the list—to the junction class or table with the lowest priority—the last class or table in the list. When Rule Process is set to Exclude source classes (inverse_source_selection = "EXCLUDE_SOURCE_CLASSES" in Python), no particular junction source class or object table must be specified. In this case, all junctions in the generated diagrams, regardless of their source class or object table, will be reduced. Note:When specifying the SystemJunctions class among the network junction source classes, the rule will systematically process both system junctions and system junction objects. | Table; Feature Class |
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
Add a Reduce Junction rule to the MyTemplate1 template that exists for a given network to systematically reduce any electric system junctions and miscellaneous junctions that are unconnected or connected to two other junctions.
import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"
input_JunctionClassToReduce1 = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.UN_112_SystemJunctions"
input_JunctionClassToReduce2 = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.ElectricDistributionJunction"
arcpy.AddReduceJunctionRule_nd(
input_Network, input_DiagramTemplate, "ACTIVE",
'INCLUDE_SOURCE_CLASSES',
input_JunctionClassToReduce1 + ";" + input_JunctionClassToReduce2,
"MAX_2_CONNECTED_JUNCTIONS", "REDUCE_UNCONNECTED_JCT", "KEEP_JCT_TO_1JCT",
"REDUCE_JCT_TO_2JCTS")
Add a Reduce Junction rule to the MyTemplate2 template that exists for a given network to systematically reduce any miscellaneous junctions when they connect two other junctions and their adjacent edges have the same values for the Asset type and Phases couple of attributes.
import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate2"
input_JunctionClassToReduce1 = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.ElectricDistributionJunction"
input_Alias1 = "Asset type"
input_Alias2 = "Phases"
arcpy.AddReduceJunctionRule_nd(
input_Network, input_DiagramTemplate, "ACTIVE",
'INCLUDE_SOURCE_CLASSES', input_JunctionClassToReduce1,
"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