<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Get all layer names in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387442#M660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the core of the code I whipped up (that is, unfortunately, failing on Linux):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((hr = OpenGeodatabase(gdbPath,geodatabase)) != S_OK) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg = L"Geodatabase not found";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; goto bailout;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((hr = geodatabase.GetChildDatasets(parentPath,datasetType,children)) != S_OK) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg = L"GetChildDatasets failed";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; goto bailout;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'd need to issue a second&lt;SPAN style="line-height: 1.5;"&gt;.GetChildDatasets on each of the first vector of children to pick up grandchildren.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;The "items" you want to extract are called "fields"; you can use Table::GetFieldInformation then FieldInfo getters. In fact, you could probably use GetFieldInformation to determine if you needed to drill deeper...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;If I get my code working I'll add it here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;[Update: Important coding tip: backslashes don't need to be trapped when in quotes on Linux.&amp;nbsp; The root parentPath is "\" (not "/" or ""),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;so a search on "\\" is correct in C++/C#, but should be "\" as a command line parameter]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;- V&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Oct 2015 18:51:20 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2015-10-21T18:51:20Z</dc:date>
    <item>
      <title>Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387436#M654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been trying for more then 4 hours but i am cinfused how i should get all layer names from gdb files. I am using latest file goedatabase API but there is no help that i can found to get all layernames in gdb. Then i have to read further each layer items.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be highly appreciated. I am attaching my gdb file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 07:19:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387436#M654</guid>
      <dc:creator>MuneemHabiba</dc:creator>
      <dc:date>2015-10-21T07:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387437#M655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is one of terminology -- File Geodatabases do not store layers.&amp;nbsp; "Layers" are drawing rules associated&amp;nbsp; with a feature class (which could come from any number of sources, including File GDB).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the FGDB API, the list of feature classes is accessed by a call to Geodatabase.GetChildDatasets().&amp;nbsp; It will generate a list of all standalone feature classes and all feature datasets, which can each be inventoried with another call (specifying the FDS as the parentPath). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 16:14:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387437#M655</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2015-10-21T16:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387438#M656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Muneem,&lt;/P&gt;&lt;P&gt;If interested, the second tool (from left) on my Toolbar addin will do an inventory of various types of feature classes (including shapes and coverages, and within FGDBs) and give you a .csv, .xls and a .txt report as output.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/55043"&gt;Python addin for data inventory and “broken-link” repair.&lt;/A&gt; &lt;/P&gt;&lt;P&gt;It uses da.walk so will go thru all the subdirectories too, so if you need to isolate one FGDB within a directory, copy it to a new folder --- that would be the easiest.&amp;nbsp; However, the reports will list the path, so you can determine where it came from.&amp;nbsp; Sample from one of my FCInventoryYYYYMMDD_HHMM.txt output files&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" height="445" src="https://community.esri.com/legacyfs/online/132619_pastedImage_1.png" style="width: 369px; height: 444.971px;" width="369" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 16:44:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387438#M656</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-10-21T16:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387439#M657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the File Geodatabase API "place", so C++ and C# code is the way to solve questions, but ArcPy can be used to validate the FGDBAPI code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 17:12:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387439#M657</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2015-10-21T17:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387440#M658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oops, sorry about that Vince.&amp;nbsp; I saw the code by Luke above was ArcPy, so just added mine.&amp;nbsp; I didn't realized that FGDBAPI was C (and didn't notice anything on the "place" overview page....not that I had looked there before your note.&amp;nbsp; Want me to delete my comment about the arcpy addin above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 17:19:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387440#M658</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-10-21T17:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387441#M659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it were 'C', I'd have my solution posted already ("The impossible we do immediately, C++ takes a bit longer").&amp;nbsp; No need to delete, since it does form a check of the FGDBAPI solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 17:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387441#M659</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2015-10-21T17:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387442#M660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the core of the code I whipped up (that is, unfortunately, failing on Linux):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((hr = OpenGeodatabase(gdbPath,geodatabase)) != S_OK) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg = L"Geodatabase not found";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; goto bailout;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((hr = geodatabase.GetChildDatasets(parentPath,datasetType,children)) != S_OK) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg = L"GetChildDatasets failed";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; goto bailout;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'd need to issue a second&lt;SPAN style="line-height: 1.5;"&gt;.GetChildDatasets on each of the first vector of children to pick up grandchildren.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;The "items" you want to extract are called "fields"; you can use Table::GetFieldInformation then FieldInfo getters. In fact, you could probably use GetFieldInformation to determine if you needed to drill deeper...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;If I get my code working I'll add it here.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;[Update: Important coding tip: backslashes don't need to be trapped when in quotes on Linux.&amp;nbsp; The root parentPath is "\" (not "/" or ""),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;so a search on "\\" is correct in C++/C#, but should be "\" as a command line parameter]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;- V&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 18:51:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387442#M660</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2015-10-21T18:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387443#M661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have the FME tool from SAFE software?&lt;/P&gt;&lt;P&gt;Than have a look at this: &lt;A href="https://knowledge.safe.com/AnswersQuestionDetail?id=906a0000000csUUAAY" title="https://knowledge.safe.com/AnswersQuestionDetail?id=906a0000000csUUAAY"&gt;FME Community Answers&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 20:11:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387443#M661</guid>
      <dc:creator>HarmenKampinga</dc:creator>
      <dc:date>2015-10-21T20:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387444#M662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, here's an [updated] standalone example.&amp;nbsp; The meat of the code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;/* .. Describe top level contents
 */
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((hr = geodatabase.GetChildDatasets(parentPath,datasetType,children)) != S_OK) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msg = L"GetChildDatasets failed";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ErrorInfo::GetErrorDescription(hr,errorText);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; goto bailout;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }

/* .. List contents (or their children)
 */
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count = children.size();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (size_t i = 0; i &amp;lt; count; i++) {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* .. Use "OpenTable" to distinguish between FDS and FC
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table table;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((hr = geodatabase.OpenTable(children.at(i),table)) != S_OK) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; numFDS++;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::vector&amp;lt;std::wstring&amp;gt; grands;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fprintf(stdout,"&amp;nbsp; %S:\n",children.at(i).c_str());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ((hr = geodatabase.GetChildDatasets(children.at(i),datasetType,grands)) == S_OK) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size_t kount = grands.size();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (size_t j = 0; j &amp;lt; kount; j++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fprintf(stdout,"&amp;nbsp;&amp;nbsp;&amp;nbsp; %S\n",grands.at(j).c_str());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; numFCs++;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fprintf(stdout,"&amp;nbsp; %S\n",children.at(i).c_str());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; numFCs++;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Using your dataset I get the folowing output:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;norge% ./fgdbList ./WS_Data.gdb "\"
&amp;nbsp; \WSInfrastructure:
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_Pump
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_Casing
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_Catchbasin
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_CatchbasinLead
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_CleanOut
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_ControlValve
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_Culvert
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_Detention
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_DischargePoint
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_Fitting
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_Inlet
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_ManagementPond
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_Manhole
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_NetworkStructure
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_OpenDrain
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_StormwaterMain
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_SystemValve
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\sw_VirtualDrainline
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_ConnectionPoint
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_CurbStop
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_FacilityFootprint
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_Flowmeter
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_Hydrant
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_Node
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_PressureDistrictExisting
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_PressureDistrictPlanned
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_ProductionWell
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_Pump
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_PumpingStation
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_SamplingStation
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_TreatmentPlant
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_UndergroundEnclosure
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_Valve
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_Watermain
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\w_WaterStorage
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_ConnectionPoint
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_EqualizationTank
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_FacilityFootprint
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_FlowControl
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_Flowmeter
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_Manhole
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_PollutionControlPlant
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_PumpingStation
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_PumpYR
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_Sewershed
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_UndergroundEnclosure
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_Valve
&amp;nbsp;&amp;nbsp;&amp;nbsp; \WSInfrastructure\ww_WastewaterMain
&amp;nbsp; \IlluminationWS
&amp;nbsp; \AssumptionArea

 FGDB Path = ./WS_Data.gdb
Containers = 1
&amp;nbsp;&amp;nbsp; Num FCs = 50

norge% ./fgdbList ./WS_Data.gdb "\" "Feature Class"
&amp;nbsp; \IlluminationWS
&amp;nbsp; \AssumptionArea

 FGDB Path = ./WS_Data.gdb
Containers = 0
&amp;nbsp;&amp;nbsp; Num FCs = 2&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to describe the fields of each table, you've got a starting point (just make sure you capture both paths where numFCs is incremented).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATED with a new zipfile and new source name, without timing and with corrected counting 21:24 EDT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387444#M662</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2021-12-11T17:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387445#M663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes sir, this is exactly what i want. Sir i am confused in one thing we will get this always on second level? like we will first call getchilddataset() and then loop through each class and call again getchilddatasets() then we will get these names?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 07:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387445#M663</guid>
      <dc:creator>MuneemHabiba</dc:creator>
      <dc:date>2015-10-27T07:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387446#M664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The file geodatabase data model only has two levels:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;simple tables or containers&lt;/LI&gt;&lt;LI&gt;tables within containers&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot place a feature dataset (or any other container) within a feature dataset (or any other container).&amp;nbsp; This is why I test with OpenTable (which has the side effect of letting you access the field information).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 15:08:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387446#M664</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2015-10-27T15:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387447#M665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sir now we have feature classes. now how to read metadata(RGN and DES file) of each of feature classes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 06:57:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387447#M665</guid>
      <dc:creator>MuneemHabiba</dc:creator>
      <dc:date>2015-10-28T06:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387448#M666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry, but I have no idea what an RGN or DES file might be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only place metadata is stored "in" a feature class is in the XML document which defines the feature class, which is exposed by Geodatabase::GetDatasetDocumentation().&amp;nbsp; Once you have the XML you can parse it with whatever tool you like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the future, please start a new thread to ask a new question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2015 15:13:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387448#M666</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2015-10-28T15:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387449#M667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vince,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had the same question as muneem: How to find the top level contents in a FGDB.&amp;nbsp; I just had a look at your sample code, but I fail to understand it.&amp;nbsp; I am working in C#.&amp;nbsp; According to the C# documentation that came with the API the "GetChildDatasets" method takes only two parameters, yet in your example you supply this function with 3 parameters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a difference between the C++ and the C# API here?&amp;nbsp; What would be the C# alternative to get the top level content?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Ward Segers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 11:31:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387449#M667</guid>
      <dc:creator>WardSegers</dc:creator>
      <dc:date>2015-11-12T11:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387450#M668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;C# is a wrapper around C++. All functions return status in C++, but that is covered by exceptions in C#, so the third parameter of &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;GetChildDatasets in &lt;/SPAN&gt;C++ (which is the returned object pointer, by reference) is just the returned value in C#. &lt;SPAN style="font-size: 14px; line-height: 1.5;"&gt;If you pull up the documentation for both C++ and C# side by side, the equivalents should be intuitive.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; line-height: 1.5;"&gt;In C#, the top level would be extracted exactly the same, using Geodatabase.&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;GetChildDatasets&lt;/SPAN&gt; with a &lt;EM&gt;parentPath&lt;/EM&gt; of "\" and a &lt;EM&gt;dataSetType&lt;/EM&gt; of ""("Feature Class" for only feature classes).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14px; line-height: 1.5;"&gt;- V&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 14:21:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387450#M668</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2015-11-12T14:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387451#M669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Vince,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now that you explained it all makes perfect sense :-).&lt;/P&gt;&lt;P&gt;Just wanted to point out that in C# the parent path should be expressed as "\\" instead of "\"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Ward Segers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 10:03:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387451#M669</guid>
      <dc:creator>WardSegers</dc:creator>
      <dc:date>2015-11-13T10:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get all layer names</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387452#M670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, in languages where backslashes are escaped (C/C++/Java/C#/Python*), the string "\" will be represented "\\".&amp;nbsp; As noted in my answer, the command-line is not one of those places, so if the parameter is being passed from the command-line, the string "\" must be used ("\\" attempts to find the empty-string named child of the empty-string dataset [which can't exist, so no rows are returned]).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Except when a literal flag is used on the string, e.g., "path = r'\' "&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Nov 2015 18:17:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/get-all-layer-names/m-p/387452#M670</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2015-11-13T18:17:35Z</dc:date>
    </item>
  </channel>
</rss>

