How to know FeatureClasses in File GDB database (eg. topo.gdb)

196
3
04-07-2013 10:28 PM
New Contributor
Hi,

I have folder "Topo.gdb" (a file gdb dataset). I need C++ piece of code, to know the FeatureClasses in that database.

Thanks in advance,
Mudapa
Reply
0 Kudos
3 Replies
Esri Esteemed Contributor
What software are you using?  If it's ArcObjects, then you should include the version
in a post to the ArcObjects forum.  It's the File Geodatabase API, then you should
say which release (though it should be 1.3) when posting in the FGDB API forum.

- V
Reply
0 Kudos
Esteemed Contributor
Mudapa:

I would suggest using python to execute this task as it is quite simple and not too hard to learn.

As such I would post this same thread to the Python subforum and include the version of ArcGIS you are using (very important) and the operating system that you are working with (not as important).

I can provide you some sample code and provide helpful links from the python forum.
Reply
0 Kudos
New Contributor
Hi All,

Thanks for the reply. I got solution for this issue.

Here is piece of code in C++

std::vector< std::wstring > childListRoot;

hr =   geodatabase.GetChildDatasets(L"\\",L"", childListRoot) // Returns  all tables,feature classes,feature datasets etc. in .gdb file
hr =   geodatabase.GetChildDatasets(L"\\",L"Feature Class", childListRoot) // Returns Feature classes in .gdb file to childListRoot


Regards,
Mudapa
Reply
0 Kudos