Skip To Content

Add Set Starting Point By Attribute Rule

Summary

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

Learn more about presetting starting points on diagrams

Usage

  • Configuring starting points on a diagram template makes sense when the template is set up to execute a Trace rule. In this case, the configured trace considers 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.

Syntax

AddSetStartingPointByAttributeRule_un (in_utility_network, template_name, is_active, network_source, {where_clause}, {junction_terminals}, {description})
ParameterExplanationData Type
in_utility_network

The utility network referencing the diagram template to modify.

Utility Network
template_name

The name of the diagram template to modify.

String
is_active

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

  • ACTIVEThe added rule becomes enabled during the generation and update of any diagrams based on the input template. This is the default.
  • INACTIVEThe added rule is not enabled during the generation or update of any diagrams based on the input template.
Boolean
network_source

The network source class that references the features that will be set as starting points.

Feature Class
where_clause
(Optional)

An SQL expression to select the subset of features in the source class 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 be considered to start tracing if the network source class references junctions with terminals.

Long
description
(Optional)

The description of the rule.

String

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network.

Utility Network
out_template_name

The name of the network 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 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_UtilityNetwork = "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.AddCollapseContainerByAttributeRule_un(input_UtilityNetwork, 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