Select to view content in your preferred language

How to perform Network Analyst and Spatial Analyst operations programmatically in ArcGIS Pro SDK?

115
1
Thursday
Labels (3)
rdc_hirohara
Occasional Contributor

Hello,

In ArcMap/ArcObjects, it was possible to perform Network Analyst operations programmatically using the
ESRI.ArcGIS.NetworkAnalyst namespace.
For example, we could:

  • Add stops (facilities) dynamically

  • Run a route solve

  • Repeat this process many times in a loop

  • Build custom analyses such as Huff models or network-based Voronoi diagrams
    by directly interacting with the NAContext, INAClass, network dataset, and solver objects.


Now, in ArcGIS Pro, I am trying to migrate the same functionality, but:

  • I cannot find any equivalent Network Analyst API (classes or methods) in the ArcGIS Pro SDK for .NET.

  • The Pro SDK documentation appears to expose only Geoprocessing (GP)-based tools, and not the internal NA objects.

  • Spatial Analyst also seems to be available only through GP tools (arcpy.sa), not via API objects.


My question:

Is there any supported way in ArcGIS Pro SDK (or ArcPy) to programmatically perform Network Analyst operations, such as:

  • Dynamically adding stops/facilities

  • Running route/service area solves repeatedly inside a loop

  • Accessing the network dataset, edges, nodes, or solver context

  • Implementing custom network-based analyses (e.g., Huff model, network Voronoi, weighted network Voronoi)

Or, is the only supported approach in ArcGIS Pro to use Geoprocessing tools (MakeServiceAreaLayer, Solve, OD Cost Matrix, etc.)?


Additional context:

I am migrating a large ArcObjects application that makes heavy use of:

  • Network Analyst

  • Spatial Analyst

  • Custom iterative network analysis

  • Facility → shortest path computations

  • Real-time update of barriers and attributes

so I want to understand the technical limitations of ArcGIS Pro SDK and the recommended architecture for replacing these workflows.


Thank you for any guidance from the Pro SDK / Network Analyst team.

0 Kudos
1 Reply
rdc_hirohara
Occasional Contributor

I found that it might be possible to accomplish what I need by using the following geoprocessing tools:

Add Locations
https://pro.arcgis.com/en/pro-app/latest/tool-reference/network-analyst/add-locations.htm

Solve
https://pro.arcgis.com/ja/pro-app/latest/tool-reference/network-analyst/solve.htm

I will try these tools to see if I can perform the Network Analyst operations from the ArcGIS Pro SDK.

0 Kudos