Add Set Starting Point By Attribute Rule (Network Diagram)

Summary

Adds a diagram rule to a diagram template to set diagram features currently represented in the diagram as starting points for tracing rules. The diagram features are queried from a given network source class or object table and can be filtered by their attributes.

Learn more about presetting starting points on 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 May be inconsistent 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.

  • Configuring starting points on a diagram template makes sense when the template is set up to execute a Trace rule. Run the Add Set Starting Point By Attribute Rule tool before the Add Trace Rule tool to set specified diagram features as starting points for the Trace rule. In this case, the Trace rule identifies the specified starting points as the only starting points for execution instead of running all the features represented in the diagram at the time it executes.

  • If the Set Starting Point rule is used prior to a subnetwork-based trace to configure starting points on diagram features representing network elements with terminals, the rule must specify the terminal ID to identify the origin of the trace. If the terminal ID is not clearly identified, the subnetwork-based trace will not know from which terminal it is expected to start. In this case, an error will indicate that there are multiple starting points outside the specified tier. When the terminal ID is specified but doesn't correspond to a subnetwork controller for the traced tier, an error will indicate that no subnetwork controller was discovered.

  • If the Set Starting Point rule is configured but none of the features in the diagram correspond to the expected starting points, the Trace rule will be skipped.

Syntax

AddSetStartingPointByAttributeRule(in_utility_network, template_name, is_active, network_source, {where_clause}, {junction_terminals}, {description})
ParameterExplanationData 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.

  • 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
network_source

The network source class or object table that references the features or objects that will be set as starting points.

Table; Feature Class
where_clause
(Optional)

An SQL expression to select the subset of features or objects in the specified source class or object table that will be set as starting points. For more information on SQL syntax, see SQL reference for query expressions used in ArcGIS.

SQL Expression
junction_terminals
[junction_terminals,...]
(Optional)

The terminal IDs that will start tracing if the network source class or object table references junctions with terminals.

The terminal IDs are all listed in the Terminal Configurations section on the Network Properties tab.

When both the where_clause and junction_terminals parameters are configured, the specified terminals must correspond to queried features or objects; otherwise, no starting points will be set.

Long
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

AddSetStartingPointByAttributeRule example (stand-alone script)

Add a Set Starting Point By Attribute rule to the MyTemplate1 template to set starting points on the Load terminal (#3) of the Circuit Breaker distribution devices (ASSETGROUP <> 4). This means that any Load terminal on circuit breakers in the generated diagrams will be set as starting points.

import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"
input_Device = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.ElectricDistributionDevice"

arcpy.AddSetStartingPointByAttributeRule_nd(input_Network, input_DiagramTemplate, 
                                             "ACTIVE", input_Device, 
                                             "ASSETGROUP <> 4", "3")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics