<?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: Condition based on existence of layers in map in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/condition-based-on-existence-of-layers-in-map/m-p/1263410#M9495</link>
    <description>&lt;P&gt;Probably I would also subscribe to the &lt;A title="MapViewInitializedEvent" href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic12856.html" target="_blank" rel="noopener"&gt;MapViewInitializedEvent&lt;/A&gt;, so you can analyze the layers and tables in the current map once the map view is ready.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Mar 2023 06:59:35 GMT</pubDate>
    <dc:creator>FridjofSchmidt</dc:creator>
    <dc:date>2023-03-02T06:59:35Z</dc:date>
    <item>
      <title>Condition based on existence of layers in map</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/condition-based-on-existence-of-layers-in-map/m-p/1263018#M9487</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I've created an ArcGIS Pro Add-in which contains some buttons, that I'd like to enable/disable based on a condition. I've read about conditions and states in the ArcGIS Pro SDK Wiki, but I'm not quite sure on which event to subscribe to.&lt;/P&gt;&lt;P&gt;The add-in is dependent on the existence of three layers in the map and two tables (all in the same filegeodatabase).&amp;nbsp; I've already made a method that checks if the layers exists (when the buttons are clicked), but I'd&amp;nbsp;like my buttons to be enabled if the layers exists in the map, and disabled if one or more of the layers are missing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;How do I proceed with this? Which events should I be subscribing to?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 14:20:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/condition-based-on-existence-of-layers-in-map/m-p/1263018#M9487</guid>
      <dc:creator>TorbjørnDalløkken2</dc:creator>
      <dc:date>2023-03-01T14:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Condition based on existence of layers in map</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/condition-based-on-existence-of-layers-in-map/m-p/1263100#M9489</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You need to listen these events: LayersAddedEvent, LayersRemovedEvent, StandaloneTablesAddedEvent and&amp;nbsp;StandaloneTablesRemovedEvent. On each event you need to run your method for layers checking and set condition depending on results.&lt;/P&gt;&lt;P&gt;To set condition status use&amp;nbsp;FrameworkApplication.State.Activate(stateID); or&amp;nbsp;FrameworkApplication.State.Deactivate(stateID);&lt;/P&gt;&lt;P&gt;stateID is the string from your add-in daml file&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 15:52:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/condition-based-on-existence-of-layers-in-map/m-p/1263100#M9489</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-03-01T15:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Condition based on existence of layers in map</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/condition-based-on-existence-of-layers-in-map/m-p/1263410#M9495</link>
      <description>&lt;P&gt;Probably I would also subscribe to the &lt;A title="MapViewInitializedEvent" href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic12856.html" target="_blank" rel="noopener"&gt;MapViewInitializedEvent&lt;/A&gt;, so you can analyze the layers and tables in the current map once the map view is ready.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 06:59:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/condition-based-on-existence-of-layers-in-map/m-p/1263410#M9495</guid>
      <dc:creator>FridjofSchmidt</dc:creator>
      <dc:date>2023-03-02T06:59:35Z</dc:date>
    </item>
  </channel>
</rss>

