Network Attributes properties

サマリー

The following properties are supported by the networkAttributes object in a utility network.

プロパティ

プロパティ説明データ タイプ
assignments
(読み取り専用)

The assignments object. This object can be used to retrieve properties of the network attribute assignments.

Object
bitPosition
(読み取り専用)

The bit position value of the network attribute.

Integer
bitSize
(読み取り専用)

The bit size value of the network attribute.

Integer
creationTime
(読み取り専用)

The creation date and time for the network attribute.

DateTime
dataType
(読み取り専用)

The data type of the network attribute—for example, integer or double.

String
edgeWeightID
(読み取り専用)

The edge weight ID value of the network attribute.

Integer
fieldType
(読み取り専用)

The data type of the of the network attribute field—for example, short or long integer, double, or date.

String
isApportionable
(読み取り専用)

A Boolean value describing whether the network attribute is apportionable.

  • True—The network attribute is apportionable.
  • False—The network attribute is not apportionable.

Boolean
ID
(読み取り専用)

The ID of the network attribute.

Integer
isEmbedded
(読み取り専用)

A Boolean value describing whether the network attribute is embedded.

  • True—The network attribute is embedded.
  • False—The network attribute is not embedded.

Boolean
isNullable
(読み取り専用)

A Boolean value describing whether the network attribute is nullable (allows null values).

  • True—The network attribute is nullable.
  • False—The network attribute does not allow null values.

Boolean
isOverridable
(読み取り専用)

A Boolean value describing whether the network attribute can be overridden.

  • True—The network attribute can be overridden.
  • False—The network attribute cannot be overridden.

Boolean
isSubstitution
(読み取り専用)

A Boolean value describing whether the network attribute is for substitution.

  • True—The network attribute is for substitution.
  • False—The network attribute is not for substitution.

Boolean
junctionWeightID
(読み取り専用)

The junction weight ID value of the network attribute.

Integer
name
(読み取り専用)

The name of the network attribute.

String
networkAttributeToSubstitute
(読み取り専用)

The value used for attribute substitution.

Learn more about advanced network attributes and attribute substitution.

String
usageType
(読み取り専用)

The usage type of the network attribute—for example, terminal ID, source ID, and asset group.

String

コードのサンプル

Utility network network attributes 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)

# 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"Network Attribute To Substitute: {na.networkAttributeToSubstitute}")
    print(f"Data Type: {na.dataType}")
    print(f"Field Type: {na.fieldType}")
    print(f"Usage Type: {na.usageType}")
    print(f"isEmbedded: {na.isEmbedded}")
    print(f"isApportionable: {na.isApportionable}")
    print(f"isOverridable: {na.isOverridable}")
    print(f"isSubstitution: {na.isSubstitution}")
    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")