<?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: I need some help with python script to create definition query? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567842#M3819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James, thanks for responding to my post. I used the SQL IN operator just like you suggested but I am still not getting the desired result. It returns just one value: Color&amp;nbsp;IN ('"Color"', 'red'). I assume my parameters are correctly set up? I corrected the "InputValue1" in the script to match the first parameter&amp;nbsp;in my initial post. I also tried to expand the script with a third parameter this way and it returned the same value three times.&lt;SPAN&gt;Color&amp;nbsp;IN ('"Color"', 'red','red','red'). What can I do to get it to work correctly?&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"""Color IN ('{0}', '{1}',&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;'{1}',&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;'{1}'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;)"""&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2018 14:46:55 GMT</pubDate>
    <dc:creator>DavidSmith</dc:creator>
    <dc:date>2018-03-19T14:46:55Z</dc:date>
    <item>
      <title>I need some help with python script to create definition query?</title>
      <link>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567840#M3817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to write a python script that will allow users to input multiple values from one field(up to 10) to create a definition query for those values. I get the script to work for one value but not for multiple.I am currently testing with just two values using the OR but when I run the script I get one value twice in the definition query for example, Color = ('red') OR Color = ('red')Can one of the experts help me out? Thanks.&amp;nbsp;This is what I have so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;#Set to current mxd and dataframe&lt;BR /&gt;mxd = arcpy.mapping.MapDocument ('CURRENT')&lt;BR /&gt;df = arcpy.mapping.ListDataFrames(mxd,"Layers")&lt;BR /&gt;Layer = (mxd,"Test",df)&lt;BR /&gt;# Set the tool parameters&lt;BR /&gt;InputFeatureclass = 'Test'&lt;BR /&gt;InputField = 'Sample'&lt;BR /&gt;InputValue = arcpy.GetParameterAsText(0)&lt;BR /&gt;InputValue1 = arcpy.GetParameterAsText(1)&lt;/P&gt;&lt;P&gt;Sample= arcpy.mapping.ListLayers(mxd, "Test")[0]&lt;BR /&gt;Sample.definitionQuery = """Color = ('{1}') OR Color = ('{1}')""".format(arcpy.AddFieldDelimiters(InputFeatureclass, InputField), InputValue)&lt;BR /&gt;arcpy.RefreshActiveView()&lt;BR /&gt;mxd.save()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 21:30:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567840#M3817</guid>
      <dc:creator>DavidSmith</dc:creator>
      <dc:date>2018-03-16T21:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: I need some help with python script to create definition query?</title>
      <link>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567841#M3818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;There are a couple things happening, it looks like you're using the AddFieldDelimiters function as the first argument to the format method, but you aren't using a placeholder in place of a field name, you've got "Color" hardcoded.&amp;nbsp; The second thing is that you've got the same placeholder ({1}) for both values, which is why you're seeing "red" repeated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;You can probably toss the AddFieldDelimiters section and go with this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;Sample&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;definitionQuery &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"""Color = '{0}' OR Color = '{1}'"""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;InputValue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; InputValue1&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're going beyond two values you might want to switch to using the SQL IN operator instead of chaining ORs together:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;Sample&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;definitionQuery &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"""Color IN ('{0}', '{1}')"""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;InputValue&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; InputValue1&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2018 21:41:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567841#M3818</guid>
      <dc:creator>JamesMacKay3</dc:creator>
      <dc:date>2018-03-16T21:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: I need some help with python script to create definition query?</title>
      <link>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567842#M3819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James, thanks for responding to my post. I used the SQL IN operator just like you suggested but I am still not getting the desired result. It returns just one value: Color&amp;nbsp;IN ('"Color"', 'red'). I assume my parameters are correctly set up? I corrected the "InputValue1" in the script to match the first parameter&amp;nbsp;in my initial post. I also tried to expand the script with a third parameter this way and it returned the same value three times.&lt;SPAN&gt;Color&amp;nbsp;IN ('"Color"', 'red','red','red'). What can I do to get it to work correctly?&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"""Color IN ('{0}', '{1}',&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;'{1}',&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;'{1}'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;)"""&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 14:46:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567842#M3819</guid>
      <dc:creator>DavidSmith</dc:creator>
      <dc:date>2018-03-19T14:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: I need some help with python script to create definition query?</title>
      <link>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567843#M3820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David, when you repeat a numbered placeholder (e.g. {1}) each occurrence of the number will hold the same value.&amp;nbsp; You can either increment the numbers each time or remove the numbers altogether, like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"""Color IN ('{0}', '{1}', '{2}', '{3}')"""&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"""Color IN ('{}', '{}', '{}', '{}')"""&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as having the word "Color" in the list, it seems as though you must be passing that into the format function as the first argument?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 15:23:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567843#M3820</guid>
      <dc:creator>JamesMacKay3</dc:creator>
      <dc:date>2018-03-19T15:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: I need some help with python script to create definition query?</title>
      <link>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567844#M3821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried pretty much everything you mentioned before but i get error messages. Incrementing the numbers as placeholder&amp;nbsp; or leaving blank results in:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"IndexError: tuple index out of range".&lt;/STRONG&gt; Or on some occasions in trying different things I get: "&lt;STRONG&gt;ValueError: cannot switch from manual field specification to automatic field numbering".&lt;/STRONG&gt; I am using ArcGIS 10.2. I am not sure if that matters anyway. I know it is probably something simple that is wrong but I can't figure it out right now.&lt;/P&gt;&lt;P&gt;But can I ask, is there a simple way to pass&amp;nbsp; selected records into a definition query in python? That could be a workaround! I already have a script that allows a user to make multiple selections using data from one field. It is written in a 'chunky' way but it works perfect.&amp;nbsp; I do not want to create any additional layer using 'make feature layer' etc. I just want the records selected by the user to be made into a definition query that displays those records of interest only.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 17:37:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567844#M3821</guid>
      <dc:creator>DavidSmith</dc:creator>
      <dc:date>2018-03-19T17:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: I need some help with python script to create definition query?</title>
      <link>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567845#M3822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post your updated code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first error message (tuple index out of range) indicates the number of arguments in your format function doesn't match the number of placeholders you've got.&amp;nbsp; I&amp;nbsp;&lt;EM&gt;think&lt;/EM&gt; the second one means you're mixing numbered and non-numbered placeholders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option is this - stitch the "IN" values together prior to creating the definition query, along these lines:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# Put the query values into a list.&lt;/SPAN&gt;
queryValues &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Red"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Blue"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Orange"&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Join them into a comma-delimited list with apostrophes wrapping each value.&lt;/SPAN&gt;
valuesWithApostrophes &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"'{0}'"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; value &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; queryValues &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
commaList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;valuesWithApostrophes&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Insert the comma-delimited list into the definition query.&lt;/SPAN&gt;
Sample&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;definitionQuery &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"""Color IN ({0})"""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;commaList&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;/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;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Edit:&amp;nbsp;&amp;nbsp;&lt;/EM&gt;Posted this under the main question instead of where I meant to, but too much of a hassle to move it...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:27:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567845#M3822</guid>
      <dc:creator>JamesMacKay3</dc:creator>
      <dc:date>2021-12-12T00:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: I need some help with python script to create definition query?</title>
      <link>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567846#M3823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;James, thanks for all your suggestions. I finally got back to this after being busy with other stuff for a while. I managed to get the script to work perfectly. This is probably not the best way to do it but since I am not an expert I will take whatever works. I had additional issues with python inserting&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;'u'&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp; in the definition query because I am still using version 2.7. and not 3. but&amp;nbsp; I found information that I needed to use&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;str&lt;/STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;method for string. I am posting the full working version here for reference.&amp;nbsp; The variables have changed.Like I&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;have&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;said in my initial post I needed a script that would allow users&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;to input multiple values from one field(up to 10 values) and create a definition query for those values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;#Set to current mxd and dataframe&lt;BR /&gt;mxd = arcpy.mapping.MapDocument ('CURRENT')&lt;BR /&gt;df = arcpy.mapping.ListDataFrames(mxd,"Layers")&lt;BR /&gt;Layer = (mxd,"SAMPLE",df)&lt;BR /&gt;# Set the tool parameters&lt;BR /&gt;InputFeatureclass = 'SAMPLE'&lt;BR /&gt;InputField = 'LIDs'&lt;BR /&gt;InputValue1 = str(arcpy.GetParameterAsText(0))&lt;BR /&gt;InputValue2 = str(arcpy.GetParameterAsText(1))&lt;BR /&gt;InputValue3 = str(arcpy.GetParameterAsText(2))&lt;BR /&gt;InputValue4 = str(arcpy.GetParameterAsText(3))&lt;BR /&gt;InputValue5 = str(arcpy.GetParameterAsText(4))&lt;BR /&gt;InputValue6 = str(arcpy.GetParameterAsText(5))&lt;BR /&gt;InputValue7 = str(arcpy.GetParameterAsText(6))&lt;BR /&gt;InputValue8 = str(arcpy.GetParameterAsText(7))&lt;BR /&gt;InputValue9 = str(arcpy.GetParameterAsText(8))&lt;BR /&gt;InputValue10 = str(arcpy.GetParameterAsText(9))&lt;/P&gt;&lt;P&gt;# Set the definition query&lt;BR /&gt;val = arcpy.mapping.ListLayers(mxd, "SAMPLE")[0]&lt;BR /&gt;val.definitionQuery = "{0} in {1} """.format(arcpy.AddFieldDelimiters(InputFeatureclass, InputField), (InputValue1,InputValue2,InputValue3,InputValue4,InputValue5,InputValue6,InputValue7,InputValue8,InputValue9,InputValue10,))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;arcpy.RefreshActiveView()&lt;BR /&gt;mxd.save()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 22:00:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/i-need-some-help-with-python-script-to-create/m-p/567846#M3823</guid>
      <dc:creator>DavidSmith</dc:creator>
      <dc:date>2018-04-27T22:00:05Z</dc:date>
    </item>
  </channel>
</rss>

