laptop and a wrench

Bug

In ArcGIS Pro, unknown alphanumeric characters are added to the Network Analysis data name.

Last Published: September 8, 2020 ArcGIS Pro
Bug ID Number BUG-000133359
SubmittedAugust 26, 2020
Last ModifiedMarch 26, 2021
Applies toArcGIS Pro
Version found2.6
Operating SystemWindows
Operating System Version10.0 64 Bit
StatusKnown Limit

Additional Information

This behavior is as designed. The feature datasets and feature classes for network analysis layers use automatically-generated unique names. In previous releases, this was done using a numbering scheme, but this was changed later on to a string of alphanumeric characters. When writing scripts, you should not try to access the network analysis layer’s sublayers directly by their data paths, as this is not a supported workflow and the naming convention is not static or guaranteed. Instead, here are two ways to directly access the results of a network analysis: Method 1 Use this method if you have a layer-based workflow in a python script. Retrieve the output sublayer’s layer object and grab the data source from this or just use the layer object itself as input into further tools. Here is an example for a Closest Facility layer. You can retrieve the Routes sublayer object from the parent Closest Facility layer object like this: routes_sublayer = layer_object.listLayers("Routes"])[0] You can then do routes_sublayer.dataSource if you want to see the actual catalog path to the data source. You can use that catalog path or the routes_sublayer object itself as input into other geoprocessing tools. To see a full workflow example similar to this, see the “MakeODCostMatrixAnalysisLayer example 4” code sample here: https://pro.arcgis.com/en/pro-app/tool-reference/network-analyst/make-od-cost-matrix-analysis-layer.htm (This uses OD Cost Matrix instead of Closest Facility, but it’s the same idea.) Method 2 This is an entirely different way of solving a network analysis problem in python, one that does not involve layers at all. In ArcGIS Pro, we introduced a new python module, arcpy.nax, that provides a new python interface for doing network analysis. The new interface is more pythonic and easier to use in many ways. You can learn the basics of how it works here: https://pro.arcgis.com/en/pro-app/arcpy/network-analyst/performing-network-analysis.htm To summarize, you create a network analysis object for the solver you want, load the desired inputs, solve, and then retrieve the results in one of several ways. You can use the export() method on the solver result object to save the outputs to a feature class. You can also retrieve the outputs using a cursor, so it’s possible to retrieve only the fields you care about and write them directly into another table that already has your desired schema.

Steps to Reproduce

Bug ID: BUG-000133359

Software:

  • ArcGIS Pro

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic