AnsweredAssumed Answered

Geoprocessing.ExecuteToolAsync C# SYNTAX

Question asked by mratcliffe_mwwssb on Apr 19, 2018
Latest reply on Apr 20, 2018 by mratcliffe_mwwssb

After reviewing available examples and references (only available in Python), I am unable to pass a successful geoprocessing.makevaluearray into the executetoolasync.  I am confident it is a C# syntax issue, and need some help...

 

Example Code:

main_lyr.Select(qf, SelectionCombinationMethod.New);

 

var in_table = main_lyr;
var out_table = Path.Combine(Project.Current.DefaultGeodatabasePath, GVar.FtrLyr + " Results");
var statistics_fields = "FEET, Sum"; //[['FEET', 'SUM']]";
var case_field = "Diameter"; // "['Diameter']";

var args = Geoprocessing.MakeValueArray(in_table, out_table, statistics_fields, case_field);

var sp_ref = SpatialReferenceBuilder.CreateSpatialReference(102629); // NAD83 SP AL E FIPS 0101 Feet

var envi = Geoprocessing.MakeEnvironmentArray(outputCoordinateSystem: sp_ref);

 

Geoprocessing.ExecuteToolAsync("Statistics_analysis", args, envi, null, null, GPExecuteToolFlags.Default);

Outcomes