Build Network (Network Analyst)


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.



BuildNetwork_na (in_network_dataset)
ParameterExplanationData Type

The network dataset to be built.

Network Dataset Layer

Code Sample

BuildNetwork example 1 (Python window)

Execute the tool using all parameters

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

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

# Name:
# Description: Build a network dataset.
# Requirements: Network Analyst Extension 
# Author: ESRI

#Import system modules
import arcpy
from arcpy import env
import sys
import os
import shutil

#Check out the Network Analyst extension license

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

#Set local variables
inNetworkDataset = "Transportation/Streets_ND"

#Build the network dataset

#If there are any build errors, they are recorded in a BuildErrors.txt file
#present in the system temp directory. So copy this file to the directory
#containing this script

#First get the path to the system temp directory
tempDir = os.environ.get("TEMP")
if tempDir:

print "Script completed successfully."


Related Topics

Licensing Information

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

Published 6/7/2010