属性
属性 | 说明 | 数据类型 |
combineUsingOr (只读) | 条件是否将 Or 条件用于 combine using 参数。
| Boolean |
isSpecificValue (只读) | 条件是否使用特定值来终止追踪。
| Boolean |
name (只读) | 用于条件的网络属性或类别的名称 - 例如,Device status。 | String |
operator (只读) | 用于条件的运算符 - 例如,等于或大于等于。 | String |
type (只读) | 使用的条件的类型 - 例如,使用特定值或网络属性。 | String |
value (只读) | 用于条件的网络属性或类别的特定值。 | Integer |
代码示例
以下独立 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")