<?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: In-memory workspace: how to check the existance of feature layer and tables? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/in-memory-workspace-how-to-check-the-existance-of/m-p/588862#M15911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Ken! Seems this is the only available way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How about looping through the datasets in the workspace and seeing if the name ("YourFClass") is in there? I've tested this with an In-memory workspace.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim pEnumDS As ESRI.ArcGIS.Geodatabase.IEnumDataset
Dim pDataset As ESRI.ArcGIS.Geodatabase.IDataset

pEnumDS = pWorkspace.Datasets(ESRI.ArcGIS.Geodatabase.esriDatasetType.esriDTAny)

Do Until pDataset Is Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp; If pDataset.Name = "YourFClass" then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show("Exists")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do
&amp;nbsp;&amp;nbsp;&amp;nbsp; pDataset = pEnumDS.Next
Loop
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:17:47 GMT</pubDate>
    <dc:creator>SuiHuang</dc:creator>
    <dc:date>2021-12-12T01:17:47Z</dc:date>
    <item>
      <title>In-memory workspace: how to check the existance of feature layer and tables?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/in-memory-workspace-how-to-check-the-existance-of/m-p/588860#M15909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Everybody:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am developing an ArcMap 10 (service pack 4) customize tool. I want to use in-memory workspace to hold some temporary data, but found that the in-memory workspace I created does not support IWorkspace2 interface such that I cannot use IWorkspace2.NameExists to check whether table or feature class is already created. Following is the screenshot of the Watch window showing this fact:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]16477[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Is there any alternative to check the existance of objects in the in-memory workspace?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 15:26:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/in-memory-workspace-how-to-check-the-existance-of/m-p/588860#M15909</guid>
      <dc:creator>SuiHuang</dc:creator>
      <dc:date>2012-07-30T15:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: In-memory workspace: how to check the existance of feature layer and tables?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/in-memory-workspace-how-to-check-the-existance-of/m-p/588861#M15910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How about looping through the datasets in the workspace and seeing if the name ("YourFClass") is in there? I've tested this with an In-memory workspace.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Dim pEnumDS As ESRI.ArcGIS.Geodatabase.IEnumDataset Dim pDataset As ESRI.ArcGIS.Geodatabase.IDataset&amp;nbsp; pEnumDS = pWorkspace.Datasets(ESRI.ArcGIS.Geodatabase.esriDatasetType.esriDTAny)&amp;nbsp; Do Until pDataset Is Nothing &amp;nbsp;&amp;nbsp;&amp;nbsp; If pDataset.Name = "YourFClass" then &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show("Exists") &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do &amp;nbsp;&amp;nbsp;&amp;nbsp; pDataset = pEnumDS.Next Loop&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 18:26:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/in-memory-workspace-how-to-check-the-existance-of/m-p/588861#M15910</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-07-30T18:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: In-memory workspace: how to check the existance of feature layer and tables?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/in-memory-workspace-how-to-check-the-existance-of/m-p/588862#M15911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Ken! Seems this is the only available way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How about looping through the datasets in the workspace and seeing if the name ("YourFClass") is in there? I've tested this with an In-memory workspace.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim pEnumDS As ESRI.ArcGIS.Geodatabase.IEnumDataset
Dim pDataset As ESRI.ArcGIS.Geodatabase.IDataset

pEnumDS = pWorkspace.Datasets(ESRI.ArcGIS.Geodatabase.esriDatasetType.esriDTAny)

Do Until pDataset Is Nothing
&amp;nbsp;&amp;nbsp;&amp;nbsp; If pDataset.Name = "YourFClass" then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show("Exists")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Do
&amp;nbsp;&amp;nbsp;&amp;nbsp; pDataset = pEnumDS.Next
Loop
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:17:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/in-memory-workspace-how-to-check-the-existance-of/m-p/588862#M15911</guid>
      <dc:creator>SuiHuang</dc:creator>
      <dc:date>2021-12-12T01:17:47Z</dc:date>
    </item>
  </channel>
</rss>

