<?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: API .NET Wrapper in File Geodatabase API Questions</title>
    <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667305#M1077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hm, very odd, the latest commit (at least I think I committed it) worked fine.&amp;nbsp; I'll check it out tomorrow and post an update.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Mar 2011 02:33:26 GMT</pubDate>
    <dc:creator>SasaI_</dc:creator>
    <dc:date>2011-03-02T02:33:26Z</dc:date>
    <item>
      <title>API .NET Wrapper</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667303#M1075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I noticed there were several requests for a .NET wrapper, but no work done (that I'm aware of) on one yet.&amp;nbsp; Being a .NET developer, I figured a wrapper would come in extremely handy, so I decided to put in some effort into creating one.&amp;nbsp; Having very little prior C/C++ experience I figured it would be a good way to learn the language while developing a useful library.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've decided to go the C++/CLI route and create an equivalent .NET class for all of the exposed API classes (I've post-fixed the name of the classes with Net to distinguish them from the native API classes).&amp;nbsp; Current code can be found at &lt;/SPAN&gt;&lt;A href="http://code.google.com/p/filegdb-dotnet-wrapper/"&gt;http://code.google.com/p/filegdb-dotnet-wrapper/&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; The wrapper is built against the beta 2 release of the API, and I will try to update it with the next release when one is available (provided there is enough of a demand).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code is still in early stages of development.&amp;nbsp; I've implemented most of the functionality (excluding access to buffers, so geometries, byte arrays, etc do not work yet), but I have not tested most of it.&amp;nbsp; I've added two samples/tests based the GeodatabaseManagement and TableSchema projects found in ESRI samples.&amp;nbsp; Using the code is pretty simple and generally similar to how it would be done from C++.&amp;nbsp; Major difference is that objects/values are returned vs. returning the function call result code.&amp;nbsp; Any errors caught during execution of the code (i.e. hr != 0) are thrown as an FGDBException, containing a short description of the error and the original result code.&amp;nbsp; Documentation on the code is sparse - you will need to consult the official ESRI documentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, my C/C++ experience prior to this project is minimal, so the C++ code may not be the best (especially in terms of memory management).&amp;nbsp; Feedback is definitely appreciated.&amp;nbsp; Let me know about any bugs found in the code, and I will try to fix them (or implement your fix if one is available).&amp;nbsp; I will try to update the project as time permits based on demand.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can be contacted through email at sasa at mapitout dot com or by posting in this thread.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 16:06:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667303#M1075</guid>
      <dc:creator>SasaI_</dc:creator>
      <dc:date>2011-03-01T16:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: API .NET Wrapper</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667304#M1076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi! excelent work! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working in other equivalent CLI/C++ DLL.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I get a error in Table::GetDefinition() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See...&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/23961-Spatial-Reference-Info"&gt;http://forums.arcgis.com/threads/23961-Spatial-Reference-Info&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried your 'SQLTest' program of your 'API .NET Wrapper' and this method also fails.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("***** Running SQL Test *****");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; GeodatabaseNet gdbnet = new GeodatabaseNet();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&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; Console.WriteLine("Opening geodatabase.");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; gdbnet.OpenGeodatabase(gdbpath);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TableNet table = gdbnet.OpenTable("Cities");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;string xml = table.GetDefinition(); -&amp;gt; ERROR ERROR ERROR&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&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; ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The no managed C++ samples in SDK work fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I reported this bug, but now I have no solution&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bye!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 22:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667304#M1076</guid>
      <dc:creator>ahuarte</dc:creator>
      <dc:date>2011-03-01T22:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: API .NET Wrapper</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667305#M1077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hm, very odd, the latest commit (at least I think I committed it) worked fine.&amp;nbsp; I'll check it out tomorrow and post an update.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 02:33:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667305#M1077</guid>
      <dc:creator>SasaI_</dc:creator>
      <dc:date>2011-03-02T02:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: API .NET Wrapper</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667306#M1078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I edited a local copy of your code in 'SQLTest' by adding this ....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;TableNet table = gdbnet.OpenTable("Cities");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;string xml = table.GetDefinition(); -&amp;gt; ERROR ERROR ERROR&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 05:29:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667306#M1078</guid>
      <dc:creator>ahuarte</dc:creator>
      <dc:date>2011-03-02T05:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: API .NET Wrapper</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667307#M1079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I edited a local copy of your code in 'SQLTest' by adding this ....&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;TableNet table = gdbnet.OpenTable("Cities");&lt;BR /&gt;string xml = table.GetDefinition(); -&amp;gt; ERROR ERROR ERROR&lt;BR /&gt;&lt;BR /&gt;...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you make the OpenTable call with "\\Cities" as the table name (i.e. explicitly specify no parent), then the definition is grabbed and result is 0.&amp;nbsp; If you open the table with "Cities" as the table name, then the definition is grabbed but result is -2147211775 (ITEM_NOT_FOUND).&amp;nbsp; I'm not entirely sure if this is a bug or if it simply isn't documented properly.&amp;nbsp; If you look at documentation of some other functions, such as Geodatabase-&amp;gt;GetChildDatasets/GetRelatedDatasets, it notes that path should be specified as "\usa", which leads me to believe that all paths should have a leading "\" specified.&amp;nbsp; Not sure why they still end up fetching the table definition even in case you don't have a leading "\".&amp;nbsp; If you debug the code and look at contents of the string variable passed to Table-&amp;gt;GetDefinition you'll notice that it is populated with the table definition, even though the result indicates it couldn't find the table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for noticing the bug.&amp;nbsp; I'll commit more tests and code updates today.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 12:35:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667307#M1079</guid>
      <dc:creator>SasaI_</dc:creator>
      <dc:date>2011-03-02T12:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: API .NET Wrapper</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667308#M1080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you very much!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 14:09:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667308#M1080</guid>
      <dc:creator>ahuarte</dc:creator>
      <dc:date>2011-03-02T14:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: API .NET Wrapper</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667309#M1081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've done a number of updates to the code which includes implementing (almost) all API functionality, various bug fixes, and addition of a test project (both for testing and for illustrating how to use the wrapper).&amp;nbsp; I've also added the source and bin downloads to the Google code project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Project home is &lt;/SPAN&gt;&lt;A href="http://code.google.com/p/filegdb-dotnet-wrapper/"&gt;http://code.google.com/p/filegdb-dotnet-wrapper/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Code downloads can be found at &lt;/SPAN&gt;&lt;A href="http://code.google.com/p/filegdb-dotnet-wrapper/downloads/list"&gt;http://code.google.com/p/filegdb-dotnet-wrapper/downloads/list&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 14:28:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667309#M1081</guid>
      <dc:creator>SasaI_</dc:creator>
      <dc:date>2011-03-08T14:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: API .NET Wrapper</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667310#M1082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nice wrapper, i have downolad-it yesterday, and the wrapper seems to do exactly what i was trying to do.&amp;nbsp; But since c++ is very difficult for me, a this dotNet wrapper whould be able to do the job.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will continue to check if update are available, but for now, the beta api with this first version of the wrapper will help me in what i need to achieve.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tank you for sharing your work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2011 12:46:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667310#M1082</guid>
      <dc:creator>LabrecqueBruno</dc:creator>
      <dc:date>2011-03-17T12:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: API .NET Wrapper</title>
      <link>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667311#M1083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks everyone for the comments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've updated the wrapper to use FileGDBAPI beta 3 release.&amp;nbsp; A couple of the tests still fail, so I have not created a src/bin download yet (you'll need to grab the latest changes from the svn trunk).&amp;nbsp; I will fix the remaining bugs over the next couple days and add a new download for version 0.3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 19:25:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/file-geodatabase-api-questions/api-net-wrapper/m-p/667311#M1083</guid>
      <dc:creator>SasaI_</dc:creator>
      <dc:date>2011-03-23T19:25:01Z</dc:date>
    </item>
  </channel>
</rss>

