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...

Build Network

Available with Network Analyst license.

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

Summary

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.

Usage

  • Before building a network dataset, an exclusive schema lock is required on the network dataset and the participating source feature classes. This means that you (or anyone else) cannot be editing the participating feature classes. You will receive an error if an exclusive schema lock cannot be obtained.
  • An SDC network dataset cannot be built as it is read only.

Syntax

BuildNetwork_na (in_network_dataset)
ParameterExplanationData Type
in_network_dataset

The network dataset to be built.

Network Dataset Layer

Code Sample

BuildNetwork example 1 (Python window)

Execute the tool using all parameters.

network = "C:/Data/Paris.gdb"
arcpy.na.BuildNetwork(network)
BuildNetwork example 2 (stand-alone Python script)

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

# Name: BuildNetwork_ex02.py
# Description: Build a network dataset.
# Requirements: Network Analyst Extension 

#Import system modules
import sys
import os
import shutil
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"

#Build the network dataset
arcpy.na.BuildNetwork(network)

#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.
temp_dir = os.environ.get("TEMP")
if temp_dir:
    shutil.copy2(os.path.join(temp_dir, "BuildErrors.txt"), sys.path[0])

print("Script completed successfully.")

Environments

  • Current Workspace

Licensing Information

  • ArcGIS for Desktop Basic: Requires Network Analyst
  • ArcGIS for Desktop Standard: Requires Network Analyst
  • ArcGIS for Desktop Advanced: Requires Network Analyst

Related Topics

  • Creating a network dataset
  • Common build errors
  • An overview of the Network Dataset 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