函数障碍属性
汇总
以下属性是在公共设施网络中使用 Describe 时由 functionBarriers 对象返回的。
属性
| 属性 | 说明 | 数据类型 |
|---|---|---|
|
functionType (只读) |
用于函数障碍的函数类型 - 例如,最小值、最大值或计数。 |
String |
|
networkAttributeName (只读) |
用于函数障碍条件的网络属性的名称。 |
String |
|
networkAttributeOperator (只读) |
用于函数障碍的运算符类型 - 例如,等于或小于。 |
String |
|
useLocalValues (只读) |
函数障碍是否使用局部值进行追踪。
|
Boolean |
|
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
# 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")