属性
属性 | 说明 | 数据类型 |
conditions (只读) | conditions 对象。 该对象可用于检索针对函数参数所设置的条件的属性。 | Object |
functionType (只读) | 用于函数参数的函数类型 - 例如,最小值、最大值或计数。 | String |
networkAttributeName (只读) | 用于函数条件的网络属性的名称。 | String |
summaryAttributeName (只读) | 用于过滤函数结果的网络属性的名称。 | String |
代码示例
以下独立 Python 脚本可打印某些公共设施网络属性的报告。
# 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")