Terminal Configuration properties

Resumen

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

Propiedades

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

The creation time of the terminal configuration.

String
defaultConfiguration
(Sólo lectura)

Of the valid terminal configurations available, this is the default path terminal configuration.

String
terminalConfigurationID
(Sólo lectura)

The ID of the terminal configuration.

Integer
terminalConfigurationName
(Sólo lectura)

The name of the terminal configuration.

String
terminals
(Sólo lectura)

The terminals object. This object can be used to retrieve properties of the terminals.

Object
traversabilityModel
(Sólo lectura)

The traversability of the terminal configuration. The directionality can be either directional or bidirectional.

String
validConfigurationPaths
(Sólo lectura)

The validConfigurationPaths object. This object can be used to retrieve properties of the valid terminal configuration paths.

Object

Muestra de código

Utility network terminal configuration 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\\mygdb.USER1.Naperville\\mygdb.USER1.ElectricNetwork"
d = arcpy.Describe(UN)

# 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 configuration paths object:
    try:
        for lc in tc.validConfigurationPaths:
            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 configuration paths \n")