I am in the process of converting from ArcObjects SDK for .NET to the ArcGIS Pro SDK for .NET. My existing code base uses the UniqueValues property of the IDataStatistics interface to get an enumerator of unique values in a field. I have been unable to find an equivalent function in the ArcGIS Pro SDK. Is there one?
Thanks as always for any assistance.
Regards,
Jay
Solved! Go to Solution.
Hi Jay,
You can do this using the statistics, although it's not as clear as I'd like it to be.
The statistics capabilities are described here.
What you will want to do is create a TableStatisticsDescription. Set the GroupBy property to the field you want to get unique values for. OrderBy and QueryFilter can be left blank. For StatisticsDescriptions, you need to pass in a "dummy" function- I would suggest you just pass in the same field and "Count" as the function.
I hope this helps some.
--Rich
Hi Jay,
You can do this using the statistics, although it's not as clear as I'd like it to be.
The statistics capabilities are described here.
What you will want to do is create a TableStatisticsDescription. Set the GroupBy property to the field you want to get unique values for. OrderBy and QueryFilter can be left blank. For StatisticsDescriptions, you need to pass in a "dummy" function- I would suggest you just pass in the same field and "Count" as the function.
I hope this helps some.
--Rich
Hi,
If you are using databases (not shapefile, dbf or info tables) you can use QueryFilter with DISTINCT in PrefixClause or PostfixClause. More info here: