Add Set Root Junction By Attribute Rule (Network Diagram)

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 Diagram to update 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 or mobile 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:

  • This tool specifies junctions in a given network junction source class or object table as root junctions by filtering those junctions by their attributes.

Parameters

LabelExplanationData Type
Input Network

The utility network or trace network containing the diagram template that will be modified.

Utility Network; Trace Network
Input Diagram Template

The name of the diagram template that will be modified.

String
Active

Specifies whether the rule will be active when generating and updating diagrams based on the specified template.

  • Checked—The added rule will become active during the generation and update of any diagrams based on the input template. This is the default.
  • Unchecked—The added rule will not become active during the generation or update of any diagrams based on the input template.

Boolean
Junction Source to Select

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
Expression
(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

LabelExplanationData Type
Output Network

The updated utility network or trace network.

Utility Network; Trace Network
Output Diagram Template

The name of the diagram template.

String

arcpy.nd.AddSetRootJunctionByAttributeRule(in_utility_network, template_name, is_active, junction_source, {where_clause}, {description})
NameExplanationData Type
in_utility_network

The utility network or trace network containing the diagram template that will be modified.

Utility Network; Trace Network
template_name

The name of the diagram template that will be modified.

String
is_active

Specifies whether the rule will be enabled when generating and updating diagrams based on the specified template.

  • ACTIVEThe added rule will become enabled during the generation and update of any diagrams based on the input template. This is the default.
  • INACTIVEThe added rule will not become enabled during the generation or update of any diagrams based on the input 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

NameExplanationData 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

AddSetRootJunctionByAttributeRule example (Python window)

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

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics