Evaluator properties

Summary

The properties below are returned by the evaluator object when using Describe on a utility network.

Properties

PropertyExplanationData Type
evaluatorType
(Read Only)

The type of evaluator used for the assignment.

String
fieldName
(Read Only)

The field name used for the evaluator.

String

Code sample

Utility network assignments and evaluator properties example (stand-alone script)

This stand-alone Python script prints a report of some utility network properties.

# Import required modules
import arcpy

# Describe function on a Utility Network
UN = "C:\\MyProject\\databaseConn.sde\\mygdb.USER1.Naperville\\mygdb.USER1.ElectricNetwork"
d = arcpy.Describe(UN)

# Network Attribute properties
netattrs = d.networkAttributes

for na in netattrs:
    print(f"Name: {na.name}")

    # For each attribute assignment in the attribute assignments object:
    try:
        unas = na.assignments
        for una in unas:
            print(" -- Attribute Assignment Properties -- ")
            print(f"Utility Network Assignment Attribute ID: {una.networkAttributeId}")
            print(f"Utility Network Assignment Attribute Source Name: {una.networkSourceName} \n")
            # For each field evaluator in the attribute evaluator object:
            print(" - Field Evaluator Properties - ")
            fe = una.evaluator
            print(f"Field Evaluator Type: {fe.evaluatorType}")
            print(f"Field Evaluator Name: {fe.fieldName} \n")

    except:
        print(f"{na.name} does not have any attribute assignments \n")