Résumé
The properties below are returned by the functions object when using Describe on a utility network.
Propriétés
Propriété | Explication | Type de données |
conditions (Lecture seule) | The conditions object. This object can be used to retrieve properties of the conditions that are set for the functions parameter. | Object |
functionType (Lecture seule) | The type of function used for the function parameter—for example, the minimum, maximum, or count. | String |
networkAttributeName (Lecture seule) | The name of the network attribute used for the function condition. | String |
summaryAttributeName (Lecture seule) | The name of the network attribute used to filter the function results. | String |
Exemple de code
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
# Functions Properties
print(" - Functions Properties - ")
for f in ust.functions:
# Try to get these properties if the exist, else, print the empty list
try:
print(f"Function Type: {f.functionType}")
print(f"Function Network Attribute Name: {f.networkAttributeName}")
print(f"Function Summary Attribute Name: {f.summaryAttributeName} \n")
# Function Conditions
print(" - Function Conditions - ")
for fc in f.conditions:
print(f"Name: {fc.name}")
print(f"Type: {fc.type}")
print(f"Operator: {fc.operator}")
print(f"Value: {fc.value}")
print(f"CombineUsingOr: {fc.combineUsingOr}")
print(f"Is Specific Value: {fc.isSpecificValue} \n")
except:
print("Skipped functions properties. \n")
Vous avez un commentaire à formuler concernant cette rubrique ?