SubnetLine 属性的聚合线

摘要

以下属性是在公共设施网络中使用 Describe 时由 aggregatedLinesForSubnetLine 对象返回的。

了解有关子网的详细信息

属性

属性说明数据类型
assetGroupCode
(只读)

SubnetLine 类的聚合线的资产组代码

Integer
assetTypes
(只读)

assetTypes 对象。 此对象可用于检索聚合线的资产类型的 assetTypeCodeassetTypeCode 是 SubnetLine 类的聚合线的资产类型代码的整数值。

Object

代码示例

公共设施网络 SubnetLine 的聚合线属性示例(独立脚本)

检索聚合线的 assetTypes 对象的资产类型代码。

# 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}")
                
        # Aggregated Lines for SubnetLine Properties        
        for al in tier.aggregatedLinesForSubnetLine:
            print(" -- Aggregated Lines for SubnetLine Properties -- ")
            print(f"Asset Group Code: {al.assetGroupCode} \n")
            print(" - Asset Type Properties - ")
            for at in al.assetTypes:
                print(f"Asset Type Code: {at.assetTypeCode} \n")

在本主题中