Upgrade Network (Network Analyst)


Upgrades the schema of the network dataset. Upgrading the network dataset allows the network dataset to make use of the new functionality available in the current software release.



UpgradeNetwork_na (in_network_dataset)
ParameterExplanationData Type

The network dataset to be upgraded. The network dataset must be a geodatabase-based network dataset.

Network Dataset Layer

Code Sample

UpgradeNetwork example 1 (Python window)

Execute the tool using all the parameters.

import arcpy
arcpy.env.workspace = "C:/Data/Socal.gdb"
UpgradeNetwork example 2 (workflow)

The following stand-alone Python script demonstrates how the UpgradeNetwork tool can be used to upgrade the schema of a network dataset.

# Name: UpgradeNetwork_Workflow.py
# Description: Upgrades the schema of a network dataset by first upgrading the 
#              geodatabase containing the network dataset and then upgrading the
#              network dataset. The network dataset is also built so that it can
#              be used to perform network analyses.
# 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/RhodeIsland.gdb"
    env.overwriteOutput = True
    #Set local variables
    #inNetworkDataset = "Transportation/Streets_ND"
    inNetworkDataset = "RhodeIsland/RhodeIsland_ND"
    #Before upgrading the network dataset, upgrade the file GDB that contains
    #the network dataset
    #Upgrade the network dataset
    #The upgraded network dataset is not built. So build the network dataset
    print "Script completed successfully"

except Exception as e:
    # If an error occurred, print line number and error message
    import traceback, sys
    tb = sys.exc_info()[2]
    print "An error occured on line %i" % tb.tb_lineno
    print str(e)


Related Topics

Licensing Information

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

Published 6/7/2010