属性
属性 | 说明 | 数据类型 |
associationSource (只读) | associationSource 对象。此对象可用于检索关联源的属性。 | Object |
categories (只读) | categories 对象。此对象可用于检索公共设施网络类别的属性。 | Object |
createDirtyAreaForAnyAttributeUpdate (只读) | 在启用了网络拓扑的情况下,是否针对任何属性更新创建脏区。
| Boolean |
creationTime (只读) | 公共设施网络的创建日期和时间。 | DateTime |
domainNetworks (只读) | domainNetworks 对象。此对象可用于检索域网络的属性。 | Object |
globalID (只读) | 公共设施网络的全局 ID。 | String |
minimalDirtyAreaSize (只读) | 网络拓扑中脏区的最小大小。 | Integer |
networkAttributes (只读) | networkAttributes 对象。此对象可用于检索网络特性的属性。 | Object |
proVersion (只读) | 用于构建公共设施网络的 ArcGIS Pro 版本。 | String |
schemaGeneration (只读) | 输入公共设施网络的方案生成值。 | Integer |
serviceTerritoryFeatureClassName (只读) | 面要素类的名称用于设置公共设施网络的范围。 | String |
systemJunctionSource (只读) | systemJunctionSource 对象。此对象可用于检索系统交汇点源的属性。 | Object |
terminalConfigurations (只读) | terminalConfigurations 对象。此对象可用于检索终端配置的属性。 | Object |
代码示例
以下独立 Python 脚本可打印某些公共设施网络属性的报告。
'''****************************************************************************
Name: DescribeUtilityNetworkProperties.py
Description: This script reports the properties of a utility network
Created by: Esri
****************************************************************************'''
# Import required modules
import arcpy
# Describe function on a Utility Network
UN = "C:\\MyProject\\databaseConn.sde\\pro21.USER1.Naperville\\pro21.USER1.ElectricNetwork"
d = arcpy.Describe(UN)
# Top level UN properties
print("Creation Time: {0}".format(d.creationTime))
print("Pro Version: {0}".format(d.proVersion))
print("Global ID: {0}".format(d.globalId))
print("Properties: {0}".format(d.properties))
print("Schema generation: {0}".format(d.schemaGeneration))
print("Minimal dirty area size: {0}".format(d.minimalDirtyAreaSize))
print("Create Dirty Area For Any Attribute Update: {0}".format(d.createDirtyAreaForAnyAttributeUpdate))
print("")
# Association source properties
asources = d.associationSource
print("*** - Assocation Sources properties - ***")
print("Name: {0}".format(asources.name))
print("ID: {0}".format(asources.sourceID))
print("Type: {0} \n".format(asources.sourceType))
# System junction source properties
sjsources = d.systemJunctionSource
print("*** - System Junction Source properties - ***")
print("Name: {0}".format(sjsources.name))
print("ID: {0}".format(sjsources.sourceID))
print("Type: {0} \n".format(sjsources.sourceType))
# Domain Network properties
domnets = d.domainNetworks
for dom in domnets:
print("*** - Domain Network properties - ***")
print("Creation Time: {0}".format(dom.creationTime))
print("Release Number: {0}".format(dom.releaseNumber))
print("Is Structure Network: {0}".format(dom.isStructureNetwork))
print("Domain Network ID: {0}".format(dom.domainNetworkId))
print("Domain Network Name: {0}".format(dom.domainNetworkName))
print("Domain Network Alias Name: {0}".format(dom.domainNetworkAliasName))
print("Subnetwork Table Name: {0}".format(dom.subnetworkTableName))
print("Subnetwork Label Field Name: {0}".format(dom.subnetworkLabelFieldName))
print("Tier Definition: {0}".format(dom.tierDefinition))
print("Subnetwork Controller Type: {0} \n".format(dom.subnetworkControllerType))
# Network Attribute properties
netattrs = d.networkAttributes
for na in netattrs:
print("*** - Network Attribute properties - ***")
print("ID: {0}".format(na.Id))
print("Name: {0}".format(na.name))
print("Data Type: {0}".format(na.dataType))
print("Usage Type: {0}".format(na.usageType))
print("isEmbedded: {0}".format(na.isEmbedded))
print("isApportionable: {0}".format(na.isApportionable))
print("isOverridable: {0}".format(na.isOverridable))
print("Domain name: {0}".format(na.domainName))
print("bitPosition: {0}".format(na.bitPosition))
print("bitSize: {0}".format(na.bitSize))
print("Junction Weight ID: {0}".format(na.junctionWeightId))
print("Edge Weight ID: {0} \n".format(na.edgeWeightId))
# For each attribute assignment in the attribute assignments object:
try:
unas = na.assignments
for una in unas:
print(" -- Attribute Assignment Properties -- ")
print("Utility Network Assignment Attribute ID: {0}".format(una.networkAttributeId))
print("Utility Network Assignment Attribute Source Name: {0} \n".format(una.networkSourceName))
# For each field evaluator in the attribute evaluator object:
print(" - Field Evaluator Properties - ")
fe = una.evaluator
print("Field Evaluator Type: {0}".format(fe.evaluatorType))
print("Field Evaluator Name: {0} \n".format(fe.fieldName))
except:
print("{0} does not have any attribute assignments \n".format(na.name))
# Terminal Configuration properties
termconfigs = d.terminalConfigurations
for tc in termconfigs:
print("*** - Terminal Configuration Properties - ***")
print("ID: {0}".format(tc.terminalConfigurationId))
print("Name: {0}".format(tc.terminalConfigurationName))
print("Traversability Model: {0}".format(tc.traversabilityModel))
print("Default Configuration: {0} \n".format(tc.defaultConfiguration))
# For each terminal in the terminals object:
for t in tc.terminals:
print(" -- Terminal Properties -- ")
print("Terminal ID: {0}".format(t.terminalId))
print("Terminal Name: {0}".format(t.terminalName))
print("Terminal Is Upstream: {0} \n".format(t.isUpstreamTerminal))
# For each configuration in the valid configurations object:
try:
for lc in tc.validConfigurations:
print(" - Configuration Properties - ")
print("Configuration Id: {0}".format(lc.id))
print("Configuration Name: {0}".format(lc.name))
print("Description: {0} \n".format(lc.description))
try:
for tp in lc.terminalPaths:
print("From terminal id: {0}".format(tp.fromTerminalId))
print("To terminal id: {0}".format(tp.toTerminalId))
except:
print("{0} does not have any valid configurations \n".format(t.terminalName))
# Categories properties
categories = d.categories
for cat in categories:
print("*** - Categories properties - ***")
print("Category creation time: {0}".format(cat.creationTime))
print("Category Name: {0} \n".format(cat.name))