Summary
Adds a diagram rule to automatically flag diagram junctions as root junctions during diagram building based on an existing template. This rule specifies root junctions based on a particular junction source class or object table and filters using their attributes.
Learn more about setting root 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.
This tool specifies junctions in a given network junction source class or object table as root junctions by filtering those junctions by their attributes.
Syntax
AddSetRootJunctionByAttributeRule(in_utility_network, template_name, is_active, junction_source, {where_clause}, {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 features or objects that belong to this source class or table are root junction candidates. | Table; Feature Class |
where_clause (Optional) | An optional SQL expression used to filter out the expected root junctions from the root junction candidates in the diagrams based on the input template. For more information on SQL syntax, see SQL reference for query expressions used in ArcGIS. | SQL Expression |
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 Set Root Junction By Attribute rule to the MyTemplate1 template existing for a given network to specify that any fuse devices that are enabled must be considered root junctions.
import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"
input_DeviceClass = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatase.MAP.ElectricDistributionDevice"
arcpy.AddSetRootJunctionByAttributeRule_nd(input_Network, input_DiagramTemplate,
"ACTIVE", input_DeviceClass,
"ASSETTYPE = 5 And ENABLED = 1")
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes