属性
属性 | 说明 | 数据类型 |
networkAttributeName (只读) | 用于过滤传播程序条件的网络属性的名称。 | String |
networkAttributeOperator (只读) | 用于传播的运算符类型 - 例如,等于或小于。 | String |
propagatedAttributeName (只读) | 用于存储已计算的传播值的字段名称。 字段类型应与用于 networkAttributeName 属性的字段一致。 | String |
substitutionAttributeName (只读) | 用于替换的网络属性。 | String |
tracePropagatorFunctionType (只读) | 用于函数障碍的函数类型 - 例如,传播的 BitwiseAnd、Min 或 Max。 | 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
# Propagator Properties
print(" - Propagator Properties - ")
for p in ust.propagators:
# Try to get these properties if they exist; otherwise, print the empty list
try:
print(f"Network Attribute Name: {p.networkAttributeName}")
print(f"Trace Propagator Function Type: {p.tracePropagatorFunctionType}")
print(f"Network Attribute Filter Operator: {p.networkAttributeOperator}")
print(f"Network Attribute Value: {p.value}")
print(f"Propagated Attribute Name: {p.propagatedAttributeName}")
print(f"Substitution Attribute Name: {p.substitutionAttributeName}")
except:
print("Skipped propagator properties. \n")