属性
属性 | 说明 | 数据类型 |
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
# Output Condition Properties
print(" - Output Condition Properties - ")
for oc in ust.outputConditions:
# Try to get these properties if the exist, else, print the empty list
try:
print(f"Name: {oc.name}")
print(f"Type: {oc.type}")
print(f"Operator: {oc.operator}")
print(f"Value: {oc.value}")
print(f"CombineUsingOr: {oc.combineUsingOr}")
print(f"Is Specific Value: {oc.isSpecificValue} \n")
except:
print("Skipped output condition properties. \n")