Cast FeatureLayer Selection to Table? C#

512
4
08-21-2018 06:21 AM
MikeRatcliffe
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.

0 Kudos
4 Replies
RichRuh
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

0 Kudos
MikeRatcliffe
Occasional Contributor

Thanks for the response, Rich.

0 Kudos
NobbirAhmed
Esri 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?

0 Kudos
RichRuh
Esri Regular Contributor

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

0 Kudos