Trace Network properties

Resumen

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

A trace network returns a dataType of "TraceNetwork".

Learn more about the trace 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
createDirtyAreaForAnyAttributeUpdate
(Sólo lectura)

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

The creation date and time of the trace network.

DateTime
globalID
(Sólo lectura)

The Global ID of the trace 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 trace network.

String
schemaGeneration
(Sólo lectura)

The schema generation value of the input trace network.

Integer
sources
(Sólo lectura)

The sources object. This object can be used to retrieve properties of the trace network sources.

Object
systemJunctionSource
(Sólo lectura)

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

Object

Muestra de código

Trace network properties example (stand-alone script)

This stand-alone PythonPython script prints a report of some trace network properties.

'''****************************************************************************
Name:        DescribeTraceNetworkProperties.py
Description: This script reports the properties of a trace network
Created by:  Esri
****************************************************************************'''

# Import required modules
import arcpy

# Describe function on a Trace Network
TN = "C:\\MyProject\\MyNetworkData.gdb\\HydroNetwork"
d = arcpy.Describe(TN)

# Top level TN properties
print("Creation Time: {0}".format(d.creationTime))
print("Pro Version: {0}".format(d.proVersion))
print("Global ID: {0}".format(d.globalId))
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}\n".format(d.createDirtyAreaForAnyAttributeUpdate))

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

# Source properties
sources = d.sources
for s in sources:
    print("*** - Sources properties - ***")
    print("Name: {0}".format(s.name))
    print("ID: {0}".format(s.sourceID))
    print("Source Type: {0} \n".format(s.sourceType))
    print("Element Type: {0} \n".format(s.elementType))
    cp = s.connectivityPolicies
    print("Connectivity Policy: {0} \n".format(cp.classConnectivity))

# 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("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:
        tnas = na.assignments
        for tna in tnas:
            print(" -- Attribute Assignment Properties -- ")
            print("Trace Network Assignment Attribute ID: {0}".format(tna.attributeId))
            print("Trace Network Assignment Attribute Source Name: {0} \n".format(tna.networkSourceName))
            # For each field evaluator in the attribute evaluator object:
            print(" - Field Evaluator Properties - ")
            fe = tna.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))