输出过滤器属性

摘要

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

了解有关控制追踪操作返回内容的详细信息

属性

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

资产组代码。

Integer
assetTypeCode
(只读)

资产类型代码。

Integer
networkSourceID
(只读)

网络源的 ID。

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

        # Output Filter Properties
        print(" - Output Filter Properties - ")
        for ofp in ust.outputFilters:
            # Try to get these properties if the exist, else, print the empty list
            try:
                for of in ofp:
                    print(f"Network Source ID: {of.networkSourceID}")
                    print(f"Asset Group Code: {of.assetGroupCode}")
                    print(f"Asset Type Code: {of.assetTypeCode} \n")
            except:
                print("Skipped output filter properties. \n")

在本主题中