Enable Network Topology (Trace Network)

Summary

Enables a network topology for a trace network.

A network topology is necessary for analytic operations such as tracing and to use network diagrams. A network topology can also be enabled to discover error features.

Learn more about how to enable a network topology

Usage

  • All trace network feature classes must have a spatial index.

  • When working with an enterprise geodatabase, the requirements are as follows:

    • The input trace network must be from a database connection established as the database trace network owner.

    • This tool must be executed when connected to the default version.

    • The trace network must be registered as branch versioned.

    • The trace network must be in a nonversioned state to use the Only generate errors advanced option.

    • License:
      The active portal account must be assigned a license with the ArcGIS Advanced Editing user type extension to use this tool in an enterprise deployment.

Parameters

LabelExplanationData Type
Input Trace Network

The trace network for which the network topology will be enabled.

Trace Network; Trace Network Layer
Maximum number of errors
(Optional)

The maximum number of errors that can occur before the process of enabling the network topology will stop. Errors will be recorded in the errors table. The default value is 10000.

Caution:

Increasing the maximum number of errors value will increase the length of time it takes to enable the topology. Setting a value higher than the default value of 10000 is not recommended.

Long
Only generate errors
(Optional)

Specifies whether the topology will be enabled or only network errors will be generated.

  • Checked—The trace network will only be evaluated for network errors The topology will not be enabled. This allows you to inspect and fix errors in the network before you enable the topology. If you are working with an enterprise geodatabase, the data cannot be registered as versioned. This allows you to inspect and fix errors in the network until you enable the topology.
  • Unchecked—The topology will be enabled and any errors that exist will generate error features. This is the default.
Boolean

Derived Output

LabelExplanationData Type
Updated Trace Network

The updated trace network.

Trace Network

arcpy.tn.EnableNetworkTopology(in_trace_network, {max_number_of_errors}, {only_generate_errors})
NameExplanationData Type
in_trace_network

The trace network for which the network topology will be enabled.

Trace Network; Trace Network Layer
max_number_of_errors
(Optional)

The maximum number of errors that can occur before the process of enabling the network topology will stop. Errors will be recorded in the errors table. The default value is 10000.

Caution:

Increasing the maximum number of errors value will increase the length of time it takes to enable the topology. Setting a value higher than the default value of 10000 is not recommended.

Long
only_generate_errors
(Optional)

Specifies whether the topology will be enabled or only network errors will be generated.

  • ONLY_ERRORSThe trace network will only be evaluated for network errors. The topology will not be enabled. If you are working with an enterprise geodatabase, the data cannot be registered as versioned. This allows you to inspect and fix errors in the network until you enable the topology.
  • ENABLE_TOPO The topology will be enabled and any errors that exist will generate error features. This is the default.
Boolean

Derived Output

NameExplanationData Type
out_trace_network

The updated trace network.

Trace Network

Code sample

EnableNetworkTopology example 1 (Python window)

Enable the network topology for a trace network called MyNetwork and set the maximum number of errors to 500 using the EnableNetworkTopology function.

import arcpy
arcpy.tn.EnableNetworkTopology('MyNetwork', 500)
EnableNetworkTopology example 2 (Python window)

Only generate errors for a trace network called MyNetwork using the EnableNetworkTopology function.

import arcpy
arcpy.tn.EnableNetworkTopology('MyNetwork', '', 'ONLY_ERRORS')

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics