Cast FeatureLayer Selection to Table? C#

117
4
08-21-2018 06:21 AM
Highlighted
Occasional Contributor

I need to perform .CalculateStatistics on a user selection from a FeatureLayer.  If i can get the selection to a proper Table Class, I can make that happen.  Need non-Geoprocessing method to cast the FeatureLayer.GetSelection() to a proper Table.

Reply
0 Kudos
4 Replies
Highlighted
Esri Regular Contributor

Hi Mike,

There is no direct way to do this.  The best solution at this point is to create a temporary table from your selection using geoprocessing tools and use that to run Table.CalculateStatistics().

--Rich

Reply
0 Kudos
Highlighted
Occasional Contributor

Thanks for the response, Rich.

Reply
0 Kudos
Highlighted
Regular Contributor

What are the parameters of the tool? I see there is only one GP tool named Calculate Statistics in the Data Management - are you talking about that tool (I guess not as this tool only takes a raster as input)? Or a custom tool?

Reply
0 Kudos
Highlighted
Esri Regular Contributor

He's asking about the Table.CalculateStatistics() method in the C# API, not about a geoprocessing tool.

Reply
0 Kudos