ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Update by Alternate ID Fields

Available with Network Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

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.

Usage

  • This tool updates the Edge#FID field values on the turn feature class based on the alternate IDs stored on each turn feature. If the turn feature classes do not reference the edges based on alternate IDs, use the Populate Alternate ID Fields tool first to create and populate alternate ID fields.

Syntax

UpdateByAlternateIDFields_na (in_network_dataset, alternate_ID_field_name)
ParameterExplanationData Type
in_network_dataset

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

Network Dataset Layer
alternate_ID_field_name

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.

String

Code Sample

UpdateByAlternateIDFields example 1 (Python window)

Execute the tool using all parameters.

network = "C:/Data/SanFrancisco.gdb/Transportation/Streets_ND"
arcpy.na.UpdateByAlternateIDFields(network, "ID")
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 

#Import system modules
import arcpy
from arcpy import env

#Check out the Network Analyst extension license
arcpy.CheckOutExtension("Network")

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

#Set local variables
network = "Transportation/Streets_ND"
alt_ID_field_name = "ID"

#Update the edge references in the turn features using alternate ID fields
arcpy.na.UpdateByAlternateIDFields(network, alt_ID_field_name)

#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
arcpy.na.BuildNetwork(network)

print("Script completed successfully.")

Environments

  • Current Workspace

Licensing Information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related Topics

  • Other edits affecting turns
  • An overview of the Turn Feature Class toolset
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal