<?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: Changing the Definition Query for multiple features in Esri Forestry Group (EFG) Questions</title>
    <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/changing-the-definition-query-for-multiple/m-p/790226#M20</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be done with Python, you could have a tool that lists all the layers in a mxd, then changes the defintion query value for each of them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000008000000" title="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000008000000"&gt;ArcGIS Help 10.1&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jul 2015 20:05:46 GMT</pubDate>
    <dc:creator>IanMurray</dc:creator>
    <dc:date>2015-07-01T20:05:46Z</dc:date>
    <item>
      <title>Changing the Definition Query for multiple features</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/changing-the-definition-query-for-multiple/m-p/790225#M19</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an mxd that contains the same shape file numerous times so that I can portray it in different ways on the map,&lt;/P&gt;&lt;P&gt;I would like to be able to change the definition query for these shape files with out having to go to each file and change each one at a time&lt;/P&gt;&lt;P&gt;Is there some type of a tool or script that can change the same file's definition query with in a mxd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 19:57:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/changing-the-definition-query-for-multiple/m-p/790225#M19</guid>
      <dc:creator>MikeFarrell</dc:creator>
      <dc:date>2015-07-01T19:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the Definition Query for multiple features</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/changing-the-definition-query-for-multiple/m-p/790226#M20</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be done with Python, you could have a tool that lists all the layers in a mxd, then changes the defintion query value for each of them. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000008000000" title="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000008000000"&gt;ArcGIS Help 10.1&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 20:05:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/changing-the-definition-query-for-multiple/m-p/790226#M20</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2015-07-01T20:05:46Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the Definition Query for multiple features</title>
      <link>https://community.esri.com/t5/esri-forestry-group-efg-questions/changing-the-definition-query-for-multiple/m-p/790227#M21</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Within the map document, this is what you would need in the python window.&amp;nbsp; If you have multiple dataframes, you would need a bit more code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
mxd = arcpy.mapping.MapDocument("Current")
layers = arcpy.mapping.ListLayers(mxd)
&lt;SPAN style="color: #004da8;"&gt;for&lt;/SPAN&gt; layer &lt;SPAN style="color: #004da8;"&gt;in&lt;/SPAN&gt; layers:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if layer.supports(definitionQuery)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.definitionQuery = """FieldName = 'Value'"""&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/esri-forestry-group-efg-questions/changing-the-definition-query-for-multiple/m-p/790227#M21</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2021-12-12T09:03:00Z</dc:date>
    </item>
  </channel>
</rss>

