Skip To Content

Geoprocessing functions in arcpy.nax

The Network Analyst module, arcpy.nax, includes functions that represent geoprocessing tools from the Network Analyst toolbox. When writing Python code, you can use these geoprocessing tools as Python functions. The following table summarizes the geoprocessing tools that are available in arcpy.nax:

Network Analyst geoprocessing functions

FunctionDescription

BuildNetwork

Reconstructs the network connectivity and attribute information of a network dataset. The network dataset needs to be rebuilt after making edits to the attributes or the features of a participating source feature class. After the source features are edited, the tool establishes the network connectivity only in the areas that have been edited to speed up the build process; however, when the network attributes are edited, the entire extent of the network dataset is rebuilt. This may be a slow operation on a large network dataset.

CalculateLocations

Adds fields to the input features that contain the network location of the features. The tool is used to store the network location information as feature attributes to quickly load the features as inputs for a network analysis layer.

CreateNetworkDatasetFromTemplate

Creates a new network dataset with the schema contained in the input template file (.xml). All the feature classes and input tables required for creating the network dataset must already exist before this tool is executed.

CreateTemplateFromNetworkDataset

Creates a file containing the schema of an existing network dataset. This template file can then be used to create a new network dataset with the same schema.

CreateTurnFeatureClass

Creates a new turn feature class to store turn features that model turning movements in a network dataset.

DissolveNetwork

Creates a network dataset that minimizes the number of line features required to correctly model the input network dataset. The more efficient output network dataset reduces the time required to solve analyses, draw results, and generate driving directions. This tool outputs a new network dataset and source feature classes; the input network dataset and its source features remain unchanged.

IncreaseMaximumEdges

Increases the maximum number of edges per turn in a turn feature class.

MakeNetworkDatasetLayer

Creates a network dataset layer from a network dataset.

PopulateAlternateIDFields

Creates and populates additional fields on the turn feature classes that reference the edges by alternate IDs. The alternate IDs allow for another set of IDs that can help maintain the integrity of the turn features in case the source edges are being edited.

ShareAsRouteLayers

Shares the results of network analyses as route layer items in a portal. A route layer includes all the information for a particular route such as the stops assigned to the route as well as the travel directions.

UpdateByAlternateIDFields

Updates all the edge references in turn feature classes using an alternate ID field. This tool should be used after making edits to the input line features that are referenced by the turn features to synchronize the turn features based on the alternate ID fields.

UpdateByGeometry

Updates all the edge references in the turn feature class using the geometry of the turn features. This tool is useful when the IDs listed for the turn can no longer find the edges participating in the turn due to edits to the underlying edges.