Select to view content in your preferred language

How to find shortest route by giving co-ordinates

335
1
06-17-2010 09:43 PM
MohdShoab
New Contributor
Hi friends
i am developing an application in C# .net using ArcGis Desktop to find shortest route. I am trying to use code shown below but it is not working


Geoprocessor GP = new Geoprocessor();
GP.AddToolbox(@"C:\arcgis\ArcTutor\GP Service Examples\ShortestRoute\ShortestRouteService.tbx");

            IVariantArray parameters = new VarArrayClass();
            parameters.Add(@"122:26:22.072, 37:42:56.354");
            parameters.Add(@"122:24:29.142, 37:43:40.154");
          
            GP.Execute("Calculate Shortest Route and Text Directions", parameters, null);

Please help me how it can be done. If any body have code related to this please send me my email id is: shoab_mohd@yahoo.com
0 Kudos
1 Reply
JaySandhu
Esri Regular Contributor
Depending on the version of ArcGIS you are using, you can search the resource centers online for source code to do such tasks. For example, here is one:

http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/d4a90e4c-ba98-44b1-9ab5-73edfaa13513.htm

Regards,
Jay Sandhu
0 Kudos