AnsweredAssumed Answered

Geoprocessor Statistics paramater

Question asked by belowzero8 on Sep 18, 2013
Latest reply on Sep 24, 2013 by kenbuja
For the Statistics geoprocessor tool one of the parameters is the "statistics_fields". It calls for the fields you want to get statistics on as well as the type of statistic. In pyton, it looks like this (see 3rd param):

arcpy.Statistics_analysis("futrds", "C:/output/output.gdb/stats", [["Shape_Length", "SUM"]], "NM")

My question is, how do I set up this parameter in .NET?

Geoprocessor GP = new Geoprocessor();  Statistics stats = new Statistics(); stats.in_table = @"C:\Temp\Test\myRight.shp"; stats.out_table = @"C:\Temp\test.dbf"; stats.statistics_fields = "[['J_Fld','COUNT']]";  GP.Execute(stats, null);

I've tried sending it strings formatted in several different ways, an array like the one in python, and a IVariantArray with no luck.