Tier properties

Zusammenfassung

The properties below are returned by the tiers object when using Describe on a utility network.

Learn more about tiers in a utility network

Eigenschaften

EigenschaftErklärungDatentyp
aggregatedLinesForSubnetLine
(Nur lesen)

The aggregatedLinesForSubnetLine object. This object can be used to retrieve properties of the aggregated lines for to SubnetLine class.

Object
creationTime
(Nur lesen)

The time that the tier was created.

String
diagramTemplates
(Nur lesen)

A list of diagram templates used for the tier.

String
name
(Nur lesen)

The name of the tier.

String
rank
(Nur lesen)

The value of the tier rank.

Integer
subnetworkFieldName
(Nur lesen)

The subnetwork field name.

String
supportDisjointSubnetwork
(Nur lesen)

Returns whether the tier supports disjoint subnetwork or not.

  • True—The tier does support disjoint subnetworks.
  • False—The tier does not support disjoint subnetworks.

Boolean
tierGroupName
(Nur lesen)

If the network has a hierarchical tier definition, this is the name of the tier group that the tier belongs to.

String
tierID
(Nur lesen)

The ID of the tier.

Integer
tierTopology
(Nur lesen)

The tier topology type. For example, radial or mesh tier topology.

String
updateSubnetworkTraceConfiguration
(Nur lesen)

The updateSubnetworkTraceConfiguration object. This object can be used to retrieve properties of the trace configuration when updating the subnetwork.

Object
validDevices
(Nur lesen)

The validDevices object. This object can be used to retrieve properties of the valid devices.

Object
validLines
(Nur lesen)

The validLines object. This object can be used to retrieve properties of the valid lines.

Object
validSubnetworkControllers
(Nur lesen)

The validSubnetworkControllers object. This object can be used to retrieve properties of the valid subnetwork controllers.

Object

Codebeispiel

Tier properties example (stand-alone script)

This stand-alone Python script is a report of properties returned by the tiers object.

'''****************************************************************************
Name:        DescribeUN_TierProperties.py
Description: This script reports the tier properties of a utility network
Created by:  Esri
****************************************************************************'''

# 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 dom in domnets:
    print("*** - Domain Network properties - ***")
    print("Domain Network Creation Time: {0}".format(dom.creationTime))
    print("Domain Network Release Number: {0}".format(dom.releaseNumber))
    print("Domain Network Name: {0}".format(dom.domainNetworkName))
    print("Domain Network ID: {0}".format(dom.domainNetworkId))
    print("Domain Network Alias Name: {0}".format(dom.domainNetworkAliasName))
    print("Domain Network is Structure Network: {0}".format(dom.isStructureNetwork))
    print("Domain Network Tier Definition: {0}".format(dom.tierDefinition))
    print("Domain Network Subnetwork Controller Type: {0} \n".format(dom.subnetworkControllerType))
    print("Domain Network Subnetwork Table Name: {0}".format(dom.subnetworkTableName))
    print("Domain Network Subnetwork Label Field Name: {0}".format(dom.subnetworkLabelFieldName))    
    
    for tier in dom.tiers:
        print("Tier Name: {0}".format(tier.name))
        print("Rank: {0}".format(tier.rank))
        print("Tier topology type: {0}".format(tier.tierTopology))
        print("Tier group name: {0} \n".format(tier.tierGroupName))
        print("Subnetwork field name: {0}".format(tier.subneworkFieldName))
        print("Supports disjoint subnetwork: {0}".format(tier.supportDisjointSubnetwork))
        print("Diagram templates: {0} \n".format(tier.diagramTemplates))

        # Subnetwork Controller Properties
        for sc in tier.validSubnetworkControllers:
            print(" -- Subnetwork Controllers Properties -- ")
            print("Asset Group Code: {0} \n".format(sc.assetGroupCode))
            print(" - Asset Type Properties - ")
            for at in sc.assetTypes:
                print("Asset Type Code: {0} \n".format(at.assetTypeCode))

        # Valid Device Properties        
        for vd in tier.validDevices:
            print(" -- Valid Devices Properties -- ")
            print("Asset Group Code: {0} \n".format(vd.assetGroupCode))
            print(" - Asset Type Properties - ")
            for at in vd.assetTypes:
                print("Asset Type Code: {0} \n".format(at.assetTypeCode))

        # Valid Lines Properties        
        for vl in tier.validLines:
            print(" -- Valid Lines Properties -- ")
            print("Asset Group Code: {0} \n".format(vl.assetGroupCode))
            print(" - Asset Type Properties - ")
            for at in vl.assetTypes:
                print("Asset Type Code: {0}".format(at.assetTypeCode))

        # Aggregated Lines for SubnetLine Properties        
        for al in tier.aggregatedLinesForSubnetLine:
            print(" -- Aggregated Lines for SubnetLine Properties -- ")
            print("Asset Group Code: {0} \n".format(al.assetGroupCode))
            print(" - Asset Type Properties - ")
            for at in al.assetTypes:
                print("Asset Type Code: {0} \n".format(at.assetTypeCode))

        # Update Subnetwork Trace Configuration Properties
        print(" -- Update Subnetwork Trace Properties -- ")        
        ust = tier.updateSubnetworkTraceConfiguration
        print("Include Containers: {0}".format(ust.includeContainers))
        print("Include Content: {0}".format(ust.includeContent))
        print("Include Structures: {0}".format(ust.includeStructures))
        print("Include Barriers: {0}".format(ust.includeBarriers))
        print("Validate Consistency: {0}".format(ust.validateConsistency))
        print("Domain Network Name: {0}".format(ust.domainNetworkName))
        print("Tier Name: {0}".format(ust.tierName))
        print("Target Tier Name: {0}".format(ust.targetTierName))
        print("Subnetwork Name: {0}".format(ust.subnetworkName))
        print("Diagram Template Name: {0}".format(ust.diagramTemplateName))
        print("Shortest Path Network Attribute Name: {0}".format(ust.shortestPathNetworkAttributeName))
        print("Filter Bitset Network Attribute Name: {0}".format(ust.filterBitsetNetworkAttributeName))
        print("Traversability Scope: {0}".format(ust.traversabilityScope))
        print("Filter Scope: {0} \n".format(ust.filterScope))

        # Condition Barrier Properties
        print(" - Condition Barrier Properties - ")
        for cb in ust.conditionBarriers:
            try:
                print("Name: {0} ".format(cb.name))
                print("Type: {0} ".format(cb.type))
                print("Operator: {0} ".format(cb.operator))
                print("Value: {0} ".format(cb.value))
                print("CombineUsingOr: {0}".format(cb.combineUsingOr))
                print("Is Specific Value: {0} \n".format(cb.isSpecificValue))
            except:
                print("Skipped condition barrier properties. \n")
        
        # Function Barrier Properties
        print(" - Function Barrier Properties - ")
        for fb in ust.functionBarriers:
            try:
                print("Name: {0} ".format(fb.networkAttributeName))
                print("Type: {0} ".format(fb.functionType))
                print("Operator: {0} ".format(fb.networkAttributeOperator))
                print("Value: {0} ".format(fb.value))
                print("Use Local Values: {0} \n".format(fb.useLocalValues))
            except:
                print("Skipped function barrier properties. \n")
            
        # Filter Barrier Properties
        print(" - Filter Barrier Properties - ")
        for filb in ust.filterBarriers:
            try:
                print("Name: {0} ".format(filb.name))
                print("Type: {0} ".format(filb.type))
                print("Operator: {0} ".format(filb.operator))
                print("Value: {0} ".format(filb.value))
                print("CombineUsingOr: {0}".format(filb.combineUsingOr))
                print("Is Specific Value: {0} \n".format(filb.isSpecificValue))
            except:
                print("Skipped filter barrier properties. \n")
        
        # Filter Function Barrier Properties
        print(" - Filter Function Barrier Properties - ")
        for ffb in ust.filterFunctionBarriers:
            try:
                print("Name: {0} ".format(ffb.networkAttributeName))
                print("Type: {0} ".format(ffb.functionType))
                print("Operator: {0} ".format(ffb.networkAttributeOperator))
                print("Value: {0} ".format(ffb.value))
                print("Use Local Values: {0} \n".format(ffb.useLocalValues))
            except:
                print("Skipped filter function properties. \n")

        # Functions Properties
        print(" - Functions Properties - ")
        for f in ust.functions:
            # Try to get these properties if the exist, else, print the empty list
            try:
                print("Function Type: {0} ".format(f.functionType))
                print("Function Network Attribute Name: {0} ".format(f.networkAttributeName))
                print("Function Summary Attribute Name: {0} \n".format(f.summaryAttributeName))
                # Function Conditions
                print(" - Function Conditions - ")
                for fc in f.conditions:
                    print("Name: {0} ".format(fc.name))
                    print("Type: {0} ".format(fc.type))
                    print("Operator: {0} ".format(fc.operator))
                    print("Value: {0} ".format(fc.value))
                    print("CombineUsingOr: {0}".format(fc.combineUsingOr))
                    print("Is Specific Value: {0} \n".format(fc.isSpecificValue))
            except:
                print("Skipped functions properties. \n")

        # Nearest Neighbor Properties
        print(" - Nearest Neighbor Properties - ")
        nn = ust.nearestNeighbor
        # Try to get these properties if the exist, else, print the empty list
        try:
            print("Count: {0} ".format(nn.count))
            print("Cost Network Attribute Name: {0} ".format(nn.costNetworkAttributeName))
            print("Nearest Categories: {0} \n".format(nn.nearestCategories))
            print(" - Nearest Asset Properties - ")
            for nsta in nn.nearestAssets:
                try:
                    print("Network Source ID: {0}".format(nsta.networkSourceID))
                    print("Asset Group Code: {0}".format(nsta.assetGroupCode))
                    print("Asset Type Code: {0} \n".format(nsta.assetTypeCode))
                except:
                    print("Skipped nearest assets properties. \n")
        except:
            print("Skipped nearest neighbor properties. \n")
            
        # 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("Network Source ID: {0}".format(of.networkSourceID))
                    print("Asset Group Code: {0}".format(of.assetGroupCode))
                    print("Asset Type Code: {0} \n".format(of.assetTypeCode))
            except:
                print("Skipped output filter properties. \n")

        # Output Condition Properties
        print(" - Output Condition Properties - ")
        for oc in ust.outputConditions:
            # Try to get these properties if the exist, else, print the empty list
            try:
                print("Name: {0} ".format(oc.name))
                print("Type: {0} ".format(oc.type))
                print("Operator: {0} ".format(oc.operator))
                print("Value: {0} ".format(oc.value))
                print("CombineUsingOr: {0}".format(oc.combineUsingOr))
                print("Is Specific Value: {0} \n".format(oc.isSpecificValue))
            except:
                print("Skipped output condition properties. \n")
            
        # Propagators Properties
        print(" - Propagator Properties - ")
        for p in ust.propagators:
            # Try to get these properties if the exist, else, print the empty list
            try:
                print("Network Attribute Name: {0} ".format(p.networkAttributeName))
                print("Trace Propagator Function Type: {0} ".format(p.tracePropagatorFunctionType))
                print("Network Attribute Filter Operator: {0} ".format(p.networkAttributeOperator))
                print("Network Attribute Value: {0} ".format(p.value))
                print("Propagated Attribute Name: {0} ".format(p.propagatedAttributeName))
                print("Substitution Attribute Name: {0} ".format(p.substitutionAttributeName))
            except:
                print("Skipped propagator properties. \n")