Function Barrier properties

Resumen

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

Learn more about using barriers to restrict traversability

Propiedades

PropiedadExplicaciónTipo de datos
functionType
(Sólo lectura)

The type of function used for the function barrier—for example, the minimum, maximum, or count.

String
networkAttributeName
(Sólo lectura)

The name of the network attribute used for the function barrier condition.

String
networkAttributeOperator
(Sólo lectura)

The type of operator used for the function barrier—for example, is equal to or is less than.

String
useLocalValues
(Sólo lectura)

Whether the function barrier is using the local values for the trace.

  • True—The function barrier is using local values.
  • False—The function barrier is using global values.

Boolean
value
(Sólo lectura)

The specific value of the network attribute or category used for the function barrier.

Integer

Muestra de código

Utility network function barriers properties example (stand-alone script)

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

# Import required modules
import arcpy

# Describe functions on a Utility Network
UN = "C:\\Projects\\MyProject\\unowner.sde\\Naperville.UNOWNER.Naperville\\Naperville.UNOWNER.Naperville" 
d = arcpy.Describe(UN)

# Domain Network properties
domnets = d.domainNetworks

# For each domain network in the utility network
for dom in domnets:
    print(f"Domain Network Name: {dom.domainNetworkName}")
    
    # For each tier in the domain network
    for tier in dom.tiers:
        print(f"Tier Name: {tier.name}")
                
        # Update Subnetwork Trace Configuration Properties     
        ust = tier.updateSubnetworkTraceConfiguration

        # Function Barrier Properties
        print(" - Function Barrier Properties - ")
        for fb in ust.functionBarriers:
            try:
                print(f"Name: {fb.networkAttributeName}")
                print(f"Type: {fb.functionType}")
                print(f"Operator: {fb.networkAttributeOperator}")
                print(f"Value: {fb.value} ")
                print(f"Use Local Values: {fb.useLocalValues} \n")
            except:
                print("Skipped function barrier properties. \n")