Summary
Assigns a network attribute to a feature class or table 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 in a feature class or table, 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 or table.
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.
When working with an enterprise geodatabase, the connected ArcGIS Enterprise portal account must be the portal utility network owner.
When working with an enterprise geodatabase, this tool must be executed when connected to the default version.
When working with an enterprise geodatabase, 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)
Parameter | Explanation | Data 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 field in the feature class or table. | String |
domain_network | The domain network that contains the feature class or table that will have a network attribute set on it. | String |
featureclass | The input feature class or table 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. Network attributes that do not support nulls can only be assigned to fields that do not allow null values. | String |
Derived Output
Name | Explanation | Data Type |
out_utility_network | The updated utility network. | Utility Network |
Code sample
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
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes