<?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: How to remove standalone table from contents in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-remove-standalone-table-from-contents/m-p/862091#M4796</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was very helpful, thank you. I was able to get it to work.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jan 2020 18:26:27 GMT</pubDate>
    <dc:creator>KhamilleJaynes</dc:creator>
    <dc:date>2020-01-29T18:26:27Z</dc:date>
    <item>
      <title>How to remove standalone table from contents</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-remove-standalone-table-from-contents/m-p/862089#M4794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello! I am trying to remove a specified standalone table from the Contents pane. Here is the code I have so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;try
{
&amp;nbsp; &amp;nbsp; &amp;nbsp;var mapView = MapView.Active;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if (mapView != null)
&amp;nbsp; &amp;nbsp; &amp;nbsp;{
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var map = mapView.Map;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (map != null)
&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;foreach (StandaloneTable table in map.StandaloneTables)
&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 (table.Name.Contains("K Factors"))
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;map.RemoveStandaloneTable(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; &amp;nbsp;}
}
catch (Exception ex)
{
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There may be multiple tables whose name contains "K Factors" and that's ok -- I would like them all removed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed that map.StandaloneTables is a&amp;nbsp;ReadOnlyObservableCollection and I'm not sure if this has to do with the exceptions that I'm getting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The exception says either, {"Class not registered\r\n\r\nClass not registered\r\n"} or&amp;nbsp;{"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any&amp;nbsp;help would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 17:00:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-remove-standalone-table-from-contents/m-p/862089#M4794</guid>
      <dc:creator>KhamilleJaynes</dc:creator>
      <dc:date>2021-12-12T17:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove standalone table from contents</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-remove-standalone-table-from-contents/m-p/862090#M4795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The RemoveStandaloneTable() method must be called on the MCT. &amp;nbsp;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
  map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;RemoveStandaloneTable&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;table&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;See &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#working-with-multithreading-in-arcgis-pro" rel="nofollow noopener noreferrer" target="_blank"&gt;Working with Multithreading in ArcGIS Pro&lt;/A&gt; for more information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:41:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-remove-standalone-table-from-contents/m-p/862090#M4795</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2021-12-12T10:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove standalone table from contents</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-remove-standalone-table-from-contents/m-p/862091#M4796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This was very helpful, thank you. I was able to get it to work.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2020 18:26:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-remove-standalone-table-from-contents/m-p/862091#M4796</guid>
      <dc:creator>KhamilleJaynes</dc:creator>
      <dc:date>2020-01-29T18:26:27Z</dc:date>
    </item>
  </channel>
</rss>

