Update by Alternate ID Fields (Network Analyst)


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.



UpdateByAlternateIDFields_na (in_network_dataset, alternate_ID_field_name)
ParameterExplanationData Type

The network dataset whose turn feature classes are being updated by their alternate ID fields.

Network Dataset Layer

The name of the alternate ID field on the edge feature sources of the network dataset. All edge feature sources referenced by turns must have the same name for the alternate ID field.


Code Sample

UpdateByAlternateIDFields example 1 (Python window)

Execute the tool using all parameters

import arcpy
arcpy.env.workspace = "C:/ArcTutor/Network Analyst/Tutorial/SanFrancisco.gdb"
UpdateByAlternateIDFields example 2 (stand-alone Python script)

The following Python script demonstrates how to use the UpdateByAlternateID Fields tool in a stand-alone script.

# Name: UpdateByAlternateIDFields_ex02.py
# Description: Update the edge references in the turn feature classes using
#              alternate IDs and build the network dataset.
# Requirements: Network Analyst Extension 
# Author: ESRI

#Import system modules
import arcpy
from arcpy import env

#Check out the Network Analyst extension license

#Set environment settings
env.workspace = "C:/data/SanFrancisco.gdb"

#Set local variables
inNetworkDataset = "Transportation/Streets_ND"
altIDFieldName = "ID"

#Update the edge references in the turn features using alternate ID fields
arcpy.UpdateByAlternateIDFields_na(inNetworkDataset, altIDFieldName)

#Since we have modified the edge references for turn sources, we should rebuild 
#the network dataset so that the turn features are correctly interpreted by the 
#network dataset

print "Script completed successfully."


Related Topics

Licensing Information

ArcView: Requires Network Analyst
ArcEditor: Requires Network Analyst
ArcInfo: Requires Network Analyst

Published 6/7/2010