Feature class name in FileGDB

205
3
02-04-2021 11:05 PM
Shanmugapriya55
New Contributor III

Hi,

I need to get the Feature classes name which are in the FileGDB using ArcGIS Runtime .NET SDK.

Is there any solution for this.

It would be happy if it is!

0 Kudos
3 Replies
MichaelBranscomb
Esri Frequent Contributor

An example solution to this question was also posted in the previous thread regarding File Geodatabase: https://community.esri.com/t5/arcgis-runtime-sdk-for-net/have-to-add-feature-classes-from-file-geoda...

Note instead of using ListFeatureClasses() and ListDatasets() you might consider using arcpy.da.walk: https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/walk.htm.

0 Kudos
Shanmugapriya55
New Contributor III

Hi,

There using python we are getting feature class name.

But When I am selecting the FileGDB, I want to get the feature class name which is in the FileGDB using ArcGIS .NET SDK.

In the previous thread we are displaying the FileGDB data to the map by mentioning the feature class name in code. But I need to get that feature class name automatically while selecting the GDB.

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

To get the feature class name from the File Geodabatase you will need to implement a python script as a Geoprocessing package. You can use the example Python script provided in the original thread as your starting point. Pass the path to the File Geodatabase as the input and return an appropriate output data set, for example a table of dataset names and types, or just a simple list of feature class names if your users are not adding rasters, mosaics, etc. Pass the name of the dataset selected into your function to create a file geodatabase workspace / create a map image sub layer.  

For more information see https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/share-analysis/create-a-geoproc...

 

0 Kudos