Select to view content in your preferred language

Support for Network Tools

3246
5
10-16-2015 10:29 PM
Bhargav_KumarK
Emerging Contributor

Hello,

I created a Model in ArcMap 10.3.1 for finding routes between two points which takes input Network Dataset and a Feature layer(for giving stops). This I have done following steps in the tutorial Author and publish a geoprocessing model—ArcGIS Runtime SDK for Qt | ArcGIS for Developers . I used network tools like Make Route Layer, Add Locations, Solve. I am able to get result as required when I run in Arc Map. When I used this result to create gpk and use in Arc GIS Runtime, I am getting output

"GET GPServer/na/execute: The specified task was not found"

na is my model name.

0 Kudos
5 Replies
LucasDanzinger
Esri Frequent Contributor

Bhargav-

First, let me suggest that if you are doing any of the following, you use the Runtime APIs directly built in tasks instead of building a GPK/Service. This will be more efficient and will not require the use of local server.

- Local Route (Offline) - ArcGIS Runtime SDK for Qt C++ API: EsriRuntimeQt::LocalRouteTask Class Reference

- Online Route - ArcGIS Runtime SDK for Qt C++ API: EsriRuntimeQt::OnlineRouteTask Class Reference

- Service Area - ArcGIS Runtime SDK for Qt C++ API: EsriRuntimeQt::ServiceAreaTask Class Reference

- Closest Facility - ArcGIS Runtime SDK for Qt C++ API: EsriRuntimeQt::ClosestFacilityTask Class Reference

If any of these do the network analysis that you need, please use these classes directly instead of the geoprocessing route. We are in the process of updating our doc to recommend the updated workflows. Based on you indicating you are doing make route layer, I believe you could use either the LocalRouteTask or the OnlineRouteTask.

If you do need to use the geoprocessor, then I am not sure what the issue is. Have you made sure to start up the service, and wait for it to start successfully before you execute the solve route? It sounds like it can't find the execute task on the REST endpoint, which may indicate it isn't successfully started.

-Luke

0 Kudos
Bhargav_KumarK
Emerging Contributor

Yes, I am not able to see execute task on REST endpoint even after starting the service.  The reason for creating gpk is I wanted to use file geodatabase(*.gdb) for network analysis.

Local Route (Offline) - ArcGIS Runtime SDK for Qt C++ API: EsriRuntimeQt::LocalRouteTask Class Reference​ ---  This can be used only if runtime geodatabase(*.geodatabase) is available, but I dont have this.

And the other classes mentioned OnlineRouteTask, ServiceAreaTask, ClosestFacilityTask are used only if Server is availabe, I dont have any server. I can use local server only.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

If you are not able to see the REST endpoint, then there was probably an issue with creating or starting the service. I suggest you create a slot to handle the service creation success/failure signals and determine what is happening when creating and starting the service.

Thanks,

Luke

0 Kudos
Bhargav_KumarK
Emerging Contributor

Service is creating successfully, but when I am creating Geoprocessor giving taskname it is not happening successfully.

Thanks,

Bhargav

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Do you get an error? You should be able to get to it through the signals for the geoprocessor.