In an effort to make the use of the Network Analyst extension more Pythonic, the newer Network Analyst (
na) module adjusts how the methods that correspond to the ArcToolbox Network Analyst tools are accessed. Instead of calling the tools directly from ArcPy, the tools are now methods of the
na module. Removing the initials of the Network Analyst toolset also reduces confusion and makes it easier to remember the name of the method. See the difference as follows:
import arcpy arcpy.CheckOutExtension("Network") busStops = r'C:\Projects\SanFrancisco.gdb\SanFrancisco\Bus_Stops networkDataset = r'C:\Projects\SanFrancisco.gdb\Chapter11Results\street_network' networkLayer = "streetRoute" impedance = "Length" routeLayerFile = ...