jking_GreenvilleWater

Best tips for migrating an arcpy.na script from ArcMap 10.6.1 to Pro 2.5?

Discussion created by jking_GreenvilleWater on Jul 22, 2020
Latest reply on Aug 3, 2020 by MMorang-esristaff

Previously, I was working in ArcMap 10.6.1 and created a script utilizing the arcpy.na module.  I had no Python background prior to this rather large undertaking, so my (still limited) Python knowledge is based in ArcGIS.

 

The purpose of this script was to iterate through a set of polygons, select the intersecting points in each polygon, load these points into a new Network Analysis Route layer, solve that route, then move on to the next polygon and repeat. 

It was working pretty well! Then, I decided to migrate to Pro 2.5...

 

I was successful in most of my gp tool migrations. However, there are 2 major "module-based" issues I am having:

1. I am having difficulty understanding how to migrate from the arcpy.mapping module to the arcpy.mp module in Pro.

2. I've been a little confused with the differences between the .nax module and the legacy .na module, even after reading the "choose your module" help page. The .nax module seems much simpler and more straightforward, but it appears to not have the ability to create network analysis layers. That is the main function of my script. 

 

I feel as though I am back at square one trying to navigate these migrations. Does anyone have any experience moving to these new modules? Is anyone else in the same boat as me?

Outcomes