AnsweredAssumed Answered

Using Geoprocessing API in stand-alone C# app

Question asked by johnselkirk on Jun 6, 2017
Latest reply on Jun 7, 2017 by cmacleod-esristaff

Hi,

 

Is it possible to run Geoprocessing tools from a stand-alone application?

 

Something like this: 

var param_values = Geoprocessing.MakeValueArray(@"C:\temp\mmpk.aprx", @"c:\temp\mmpk.mmpk");

 

var gp_result = await Geoprocessing.ExecuteToolAsync("CreateMobileMapPackage_management", param_values);

The reason I ask is that when the 1st line is called I get a null reference exception. It's like it's not initialized properly.

 

 

I have followed the steps in ProConcepts CoreHost · Esri/arcgis-pro-sdk Wiki · GitHub  and it does Host.Initialize() properly.

 

Anyone else tried doing this?

 

John.

Outcomes