Skip To Content

Set Network Attribute

Summary

Assigns a network attribute to a feature class at the asset type level to be used during tracing operations.

A utility network can have a set of network attributes associated with it. A network attribute is a value stored in the network topology derived from attributes on corresponding features in the network. While a network attribute can be associated with only one attribute on a feature class, there is no limit to the number of network attributes a single utility network can have. Network attributes are used as weights to control traversability and to model the cost of paths in the network.

Usage

  • Network attributes are used by tracing analysis to control how the network can be traversed.

  • A network attribute can be associated with only one attribute on a feature class.

  • This tool may be used along with the Add Network Attribute tool, which is used to add the network attribute to the utility network.

  • The network topology must be disabled.

  • The connected ArcGIS Enterprise portal account must be the portal utility network owner.

  • This tool should be executed when connected to the default version.

  • The input utility network must be from a database connection established as the database utility network owner.

Syntax

SetNetworkAttribute(in_utility_network, network_attribute, domain_network, featureclass, field)
ParameterExplanationData Type
in_utility_network

The utility network that contains the network attribute to set.

Utility Network; Utility Network Layer
network_attribute

The network attribute to be assigned to the feature class field.

String
domain_network

The domain network that contains the feature class that will have a network attribute set on it.

String
featureclass

The input feature class that contains the field that will be used to set the network attribute.

String
field

An existing field that will be assigned the network attribute. The field data type must match the data type of the network attribute. For example, if the network attribute is a short integer type, the field must also be a short integer type.

String

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network.

Utility Network

Code sample

SetNetworkAttribute example (Python window)

Set a network attribute named Lifecycle Status to use the lifecyclestatus field in the ElectricDistributionLine feature class.

import arcpy
arcpy.SetNetworkAttribute_un("Utility Network", "Lifecycle Status", 
                             "ElectricDistribution", "ElectricDistributionLine", 
                             "lifecyclestatus")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics