Geoprocessing.MakeValueArray throws System.Nullexception while using in console application. Is ArcGIS.Desktop.Core assembly supported in Console application and if yes what could be the issue it throws exception?
string inRas1 = @"C:\Sample1.tif";
string inRas2 = @"C:\Sample2.tif";
string maExpression = String.Format("Con((‘{0}’ > 30), ‘{1}’)", inRas1, inRas2);
string outRaster = @"C:\output.tif";
var valueArray = Geoprocessing.MakeValueArray(maExpression,outRaster);
var gpresult = await Geoprocessing.ExecuteToolAsync("RasterCalculator_sa", valueArray);
Hi Piyush
Only ArcGIS.CoreHost and ArcGIS.Core assemblies are supported with a console application in ArcGIS Pro.
Thanks!
Uma