Skip to main content

关联源属性

汇总

公共设施网络中的 associationSource 对象支持下列属性。

属性

属性 说明 数据类型

name

(只读)

关联网络源的名称。

String

sourceID

(只读)

关联网络源 ID。

Integer

sourceType

(只读)

关联网络源的类型。

String

代码示例

公共设施网络关联源属性示例(独立脚本)

以下独立 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\\mygdb.USER1.Naperville\\mygdb.USER1.ElectricNetwork"
d = arcpy.Describe(UN)

# Association source properties
asources = d.associationSource
print("Association Sources properties")
print(f"Name: {asources.name}")
print(f"ID: {asources.sourceID}")
print(f"Type: {asources.sourceType} \n")