Utility Network properties

Synthèse

The Describe function returns the following properties for a utility network.

A utility network returns a dataType of "UtilityNetwork".

Learn more about the utility network

Propriétés

PropriétéExplicationType de données
associationSource
(Lecture seule)

The associationSource object. This object can be used to retrieve properties of the association sources.

Object
categories
(Lecture seule)

The categories object. This object can be used to retrieve properties of the utility network categories.

Object
createDirtyAreaForAnyAttributeUpdate
(Lecture seule)

Whether dirty areas are created for any attribute update when the network topology is enabled.

  • True—Dirty areas are created for any attribute update.
  • False—Dirty areas are not created for any attribute update.

Boolean
creationTime
(Lecture seule)

The creation date and time of the utility network.

DateTime
domainNetworks
(Lecture seule)

The domainNetworks object. This object can be used to retrieve properties of the domain networks.

Object
globalID
(Lecture seule)

The Global ID of the utility network.

String
minimalDirtyAreaSize
(Lecture seule)

The minimum size of the dirty areas in the network topology.

Integer
networkAttributes
(Lecture seule)

The networkAttributes object. This object can be used to retrieve properties of the network attributes.

Object
proVersion
(Lecture seule)

The last ArcGIS Pro client that created or upgraded the utility network.

String
schemaGeneration
(Lecture seule)

The Utility Network Version of the input utility network.

Integer
serviceTerritoryFeatureClassName
(Lecture seule)

The name of the polygon feature class used to set the extent for the utility network.

String
systemJunctionObjectSource
(Lecture seule)

The systemJunctionObjectSource object. This object can be used to retrieve properties of the system junction object sources.

Object
systemJunctionSource
(Lecture seule)

The systemJunctionSource object. This object can be used to retrieve properties of the system junction sources.

Object
terminalConfigurations
(Lecture seule)

The terminalConfigurations object. This object can be used to retrieve properties of the terminal configurations.

Object

Exemple de code

Utility network properties example (stand-alone script)

This stand-alone Python script prints a report of some utility network properties.

'''****************************************************************************
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(f"Creation Time: {d.creationTime}")
print(f"Pro Version: {d.proVersion}")
print(f"Global ID: {d.globalId}")
print(f"Properties: {d.properties}")
print(f"Schema generation: {d.schemaGeneration}")
print(f"Minimal dirty area size: {d.minimalDirtyAreaSize}")
print(f"Create Dirty Area For Any Attribute Update: {d.createDirtyAreaForAnyAttributeUpdate} \n")

# 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")

# System junction source properties
sjsources = d.systemJunctionSource
print("*** - System Junction Source properties - ***")
print(f"Name: {sjsources.name}")
print(f"ID: {sjsources.sourceID}")
print(f"Type: {sjsources.sourceType} \n")

# Domain Network properties
domnets = d.domainNetworks
for dom in domnets:
    print("*** - Domain Network properties - ***")
    print(f"Creation Time: {dom.creationTime}")
    print(f"Release Number: {dom.releaseNumber}")
    print(f"Is Structure Network: {dom.isStructureNetwork}")
    print(f"Domain Network ID: {dom.domainNetworkId}")
    print(f"Domain Network Name: {dom.domainNetworkName}")
    print(f"Domain Network Alias Name: {dom.domainNetworkAliasName}")
    print(f"Subnetwork Table Name: {dom.subnetworkTableName}")
    print(f"Subnetwork Label Field Name: {dom.subnetworkLabelFieldName}")
    print(f"Tier Definition: {dom.tierDefinition}")
    print(f"Subnetwork Controller Type: {dom.subnetworkControllerType} \n")

# Network Attribute properties
netattrs = d.networkAttributes
for na in netattrs:
    print("*** - Network Attribute properties - ***")
    print(f"ID: {na.Id}")
    print(f"Name: {na.name}")
    print(f"Data Type: {na.dataType}")
    print(f"Usage Type: {na.usageType}")
    print(f"isEmbedded: {na.isEmbedded}")
    print(f"isApportionable: {na.isApportionable}")
    print(f"isOverridable: {na.isOverridable}")
    print(f"Domain name: {na.domainName}")
    print(f"bitPosition: {na.bitPosition}")
    print(f"bitSize: {na.bitSize}")
    print(f"Junction Weight ID: {na.junctionWeightId}")
    print(f"Edge Weight ID: {na.edgeWeightId} \n")

    # For each attribute assignment in the attribute assignments object:
    try:
        unas = na.assignments
        for una in unas:
            print(" -- Attribute Assignment Properties -- ")
            print(f"Utility Network Assignment Attribute ID: {una.networkAttributeId}")
            print(f"Utility Network Assignment Attribute Source Name: {una.networkSourceName} \n")
            # For each field evaluator in the attribute evaluator object:
            print(" - Field Evaluator Properties - ")
            fe = una.evaluator
            print(f"Field Evaluator Type: {fe.evaluatorType}")
            print(f"Field Evaluator Name: {fe.fieldName} \n")
    except:
        print(f"{na.name} does not have any attribute assignments \n")

# Terminal Configuration properties
termconfigs = d.terminalConfigurations
for tc in termconfigs:
    print("*** - Terminal Configuration Properties - ***")
    print(f"ID: {tc.terminalConfigurationId}")
    print(f"Name: {tc.terminalConfigurationName}")
    print(f"Traversability Model: {tc.traversabilityModel}")
    print(f"Default Configuration: {tc.defaultConfiguration} \n")

    # For each terminal in the terminals object:
    for t in tc.terminals:
        print(" -- Terminal Properties -- ")
        print(f"Terminal ID: {t.terminalId}")
        print(f"Terminal Name: {t.terminalName}")
        print(f"Terminal Is Upstream: {t.isUpstreamTerminal} \n")

    # For each configuration in the valid configurations object:
    try:
        for lc in tc.validConfigurations:
            print(" - Configuration Properties - ")
            print(f"Configuration Id: {lc.id}")
            print(f"Configuration Name: {lc.name}")
            print(f"Description: {lc.description} \n")
            try:
                for tp in lc.terminalPaths:
                    print(f"From terminal id: {tp.fromTerminalId}")
                    print(f"To terminal id: {tp.toTerminalId}")
            except:
                print(f"{lc.name} does not have any terminal paths \n")
    except:
        print(f"{t.terminalName} does not have any valid configurations \n")

# Categories properties
categories = d.categories
for cat in categories:
    print("*** - Categories properties - ***")
    print(f"Category creation time: {cat.creationTime}")
    print(f"Category Name: {cat.name} \n")