Utility Network properties

Resumen

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

A utility network returns a dataType of "Utility Network".

Learn more about the utility network

Propiedades

PropiedadExplicaciónTipo de datos
associationSource
(Sólo lectura)

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

Object
categories
(Sólo lectura)

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

Object
createDirtyAreaForAnyAttributeUpdate
(Sólo lectura)

Whether or not 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
(Sólo lectura)

The creation date and time of the utility network.

DateTime
domainNetworks
(Sólo lectura)

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

Object
globalID
(Sólo lectura)

The Global-ID of the utility network.

String
minimalDirtyAreaSize
(Sólo lectura)

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

Integer
networkAttributes
(Sólo lectura)

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

Object
proVersion
(Sólo lectura)

The version of ArcGIS Pro used to build the utility network.

String
schemaGeneration
(Sólo lectura)

The schema generation value of the input utility network.

Integer
serviceTerritoryFeatureClassName
(Sólo lectura)

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

String
systemJunctionSource
(Sólo lectura)

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

Object
terminalConfigurations
(Sólo lectura)

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

Object

Muestra de código

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

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

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

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

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

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

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

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

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

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