<?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: Python script to enter String &amp;amp; Dates in existing fields in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297989#M23050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The pass function was included in the initial Python_addin.py.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import pythonaddins

class ParcelSearch(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for Python_addin.btn1 (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I removed the pass function and the result was still the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I used the SelectLayerByAttribute_management in my initial script, should the Python_addin use the same function?&amp;nbsp; Since, the Python_addin I am running calls for the ZoomtoSelectedFeatures?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 14:18:14 GMT</pubDate>
    <dc:creator>JacobDrvar</dc:creator>
    <dc:date>2021-12-11T14:18:14Z</dc:date>
    <item>
      <title>Python script to enter String &amp;amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297979#M23040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am attempting to write a Python Script that selects a record in the attribute table, zooms to the selected feature, and prompts the user to enter their name, date created, and date modified.&amp;nbsp; The name, date created, and date modified fields already exist in the attribute table.&amp;nbsp; The name field is a string type, and the date fields are date types.&amp;nbsp; I have the first part of the script written, it prompts the user to enter a RENUM value, which selects a record in the Parcels attribute table, and zooms to the selected feature.&amp;nbsp; How would I get the script to prompt the user to enter their name, date created, and date modified?&amp;nbsp; Then, have the information they enter stored in the attribute table?&amp;nbsp; I am going to have the users run the script from ArcToolbox.&amp;nbsp;&amp;nbsp; Any suggestions would be welcomed.&amp;nbsp; Thanks.&amp;nbsp; What I have so far is displayed below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;#Import
import arcpy

#Variables
Parcels = arcpy.GetParameterAsText(0)

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
lyr = arcpy.mapping.ListLayers(mxd, "Parcels", df)[0]
arcpy.AddMessage(lyr.name)

#Logic
try:
 whereClause = "RENUM = "+Parcels+""
 arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", whereClause)
 df.extent = lyr.getSelectedExtent()
 df.scale = df.scale*1.1

except:
 print arcpy.GetMessages()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 17:44:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297979#M23040</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2013-07-19T17:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297980#M23041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;All,&lt;BR /&gt;&lt;BR /&gt;I am attempting to write a Python Script that selects a record in the attribute table, zooms to the selected feature, and prompts the user to enter their name, date created, and date modified.&amp;nbsp; The name, date created, and date modified fields already exist in the attribute table.&amp;nbsp; The name field is a string type, and the date fields are date types.&amp;nbsp; I have the first part of the script written, it prompts the user to enter a RENUM value, which selects a record in the Parcels attribute table, and zooms to the selected feature.&amp;nbsp; How would I get the script to prompt the user to enter their name, date created, and date modified?&amp;nbsp; Then, have the information they enter stored in the attribute table?&amp;nbsp; I am going to have the users run the script from ArcToolbox.&amp;nbsp;&amp;nbsp; Any suggestions would be welcomed.&amp;nbsp; Thanks.&amp;nbsp; What I have so far is displayed below:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#Import
import arcpy

#Variables
Parcels = arcpy.GetParameterAsText(0)

mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
lyr = arcpy.mapping.ListLayers(mxd, "Parcels", df)[0]
arcpy.AddMessage(lyr.name)

#Logic
try:
 whereClause = "RENUM = "+Parcels+""
 arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", whereClause)
 df.extent = lyr.getSelectedExtent()
 df.scale = df.scale*1.1

except:
 print arcpy.GetMessages()&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One pattern that may work is to implement a Python Add-In that allows for some user interaction, opens another Toolbox dialog that accepts the Name and date parameters and peform the update to the attribute table of ths selected features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that is a very general outline, but this is something that we have done and it works fine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:18:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297980#M23041</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T14:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297981#M23042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you provide an example?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 18:31:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297981#M23042</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2013-07-19T18:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297982#M23043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;One pattern that may work is to implement a Python Add-In that allows for some user interaction, opens another Toolbox dialog that accepts the Name and date parameters and peform the update to the attribute table of ths selected features.&lt;BR /&gt;&lt;BR /&gt;I know that is a very general outline, but this is something that we have done and it works fine.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the suggestion.&amp;nbsp; I may do that eventually.&amp;nbsp; But, for now I would prefer to get the script up and running.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 18:35:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297982#M23043</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2013-07-19T18:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297983#M23044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First is to build the Add-In:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000025000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000025000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, code the click event to open the Toolbox you create that accepts the Name and Date parameters and peforms the updates.&amp;nbsp; That is, build tat Toolbox and launch it from your add-in like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

pythonaddins.GPToolDialog(r'C:\Documents\MyToolbox.tbx', 'AttributeEditor')"""

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297983#M23044</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T14:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297984#M23045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks.&amp;nbsp; I will need to read up on Python add-ins.&amp;nbsp; With the add-in, will I still need to figure out the scripting part?&amp;nbsp; Or will the add-in allow a GUI?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 18:54:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297984#M23045</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2013-07-19T18:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297985#M23046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks.&amp;nbsp; I will need to read up on Python add-ins.&amp;nbsp; With the add-in, will I still need to figure out the scripting part?&amp;nbsp; Or will the add-in allow a GUI?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It depends on the type of Add-In.&amp;nbsp; If it is a Python Add-In, then your GUI options are quite limited.&amp;nbsp; I think if you have Visual Studio and build your user interfaces there, then this type of Add-In can extend your options quite a bit.&amp;nbsp; I've not gone thru the later myself, I have built a ton of COM objects/extension in ArcObjects complete with package installers, but have not had a chance to check out the add-in model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My experience with the Python Add-in implementations has been with mixed feelings.&amp;nbsp; You get lots of restrictions placed on you for the GUI-side, but I love the Geoprocessing (scripting) for speeding up the development time compared to building your own ArcObjects.&amp;nbsp; What I am suggesting is that we have used an extra Geoprocessing tool that simply acts as a GUI to collect user input by launching it from a Python Add-In.&amp;nbsp; That is, the add-in allows you to create the toolbar, with some ways to 'do stuff', then you can launch another toolbox that is merely a user interface or/and includes the geoprocessing that you need to get done.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 12:48:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297985#M23046</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-07-22T12:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297986#M23047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attempting to create the toolbar/button and nothing.&amp;nbsp; The button does not work, but I believe it has something to do with the script.&amp;nbsp; ESRI suggestions adding the following script to the onClick(self) function.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Implementation of OnClick method of Button's class
def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get the current map document and the first data frame.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument('current')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df = arcpy.mapping.ListDataFrames(mxd)[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Call the zoomToSelectedFeatures() method of the data frame class
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.zoomToSelectedFeatures()
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, my code looks like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import pythonaddins

class ParcelSearch(object):
 """Implementation for Python_addin.btn1 (Button)"""
 def __init__(self):
&amp;nbsp; self.enabled = True
&amp;nbsp; self.checked = False
 def onClick(self):
&amp;nbsp; #Implementation of OnClick method of Button's class
def onClick(self):
&amp;nbsp; #Get the current map document and the first data frame.
&amp;nbsp; mxd = arcpy.mapping.MapDocument('current')
&amp;nbsp; df = arcpy.mapping.ListDataFrames(mxd)[0]
&amp;nbsp; #Call the zoomToSelectedFeatures() method of the data frame class
&amp;nbsp; df.zoomToSelectedFeatures()
pass&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I missing to get the zoom to selected features part working?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:18:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297986#M23047</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2021-12-11T14:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297987#M23048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am attempting to get the toolbar/button working.&amp;nbsp; ESRI (&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/button/014p0000001z000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/button/014p0000001z000000/&lt;/A&gt;&lt;SPAN&gt;) suggests adding the following script to the onClick(self) function:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Implementation of OnClick method of Button's class
def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get the current map document and the first data frame.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument('current')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df = arcpy.mapping.ListDataFrames(mxd)[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Call the zoomToSelectedFeatures() method of the data frame class
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.zoomToSelectedFeatures()&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My script then looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import pythonaddins

class ParcelSearch(object):
#Implementation for Python_addin.btn1 (Button)
 def __init__(self):
&amp;nbsp; self.enabled = True
&amp;nbsp; self.checked = False
 def onClick(self):
&amp;nbsp; #Get the current map document and the first data frame.
&amp;nbsp; mxd = arcpy.mapping.MapDocument('current')
&amp;nbsp; df = arcpy.mapping.ListDataFrames(mxd)[0]
&amp;nbsp; #Call the zoomToSelectedFeatures() method of the data frame class
&amp;nbsp; df.zoomToSelectedFeatures()

 pass&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What am I overlooking to get the zoom to selected features working?&amp;nbsp; I believe something is wrong with my Python_addin.py.&amp;nbsp; Nothing happens with I click the button within ArcMap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:18:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297987#M23048</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2021-12-11T14:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297988#M23049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I see a "pass" in there at the end --- you should only have that in the def/methods that you do not want to implement.&amp;nbsp; Not sure if that should be there or if it would have any effect, but I'd go ahead and remove it and see if the tool works then.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 14:26:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297988#M23049</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2013-07-22T14:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297989#M23050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The pass function was included in the initial Python_addin.py.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import pythonaddins

class ParcelSearch(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for Python_addin.btn1 (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I removed the pass function and the result was still the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I used the SelectLayerByAttribute_management in my initial script, should the Python_addin use the same function?&amp;nbsp; Since, the Python_addin I am running calls for the ZoomtoSelectedFeatures?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:18:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297989#M23050</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2021-12-11T14:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297990#M23051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The pass function was included in the initial Python_addin.py.&amp;nbsp; &lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import pythonaddins

class ParcelSearch(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for Python_addin.btn1 (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I removed the pass function and the result was still the same.&lt;BR /&gt;&lt;BR /&gt;If I used the SelectLayerByAttribute_management in my initial script, should the Python_addin use the same function?&amp;nbsp; Since, the Python_addin I am running calls for the ZoomtoSelectedFeatures?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What I was suggesting was for you keep all of the code you had for the OnClick event, but simply just remove the pass argument at the bottom.&amp;nbsp; That is all.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know it automatically has it in there for each method/def when you generate the add-in for the first time.&amp;nbsp; It is up to you to determine which event to use, add the appropriate code and get the add-in installed.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is going to be very difficult for me to work thru the rest as there are so many little things to get done on the add-in --- you might have to rebuild and re-install it after you complete edits.&amp;nbsp; I really don't know why it is not zooming to selected and is something you might have to trial-and-error your way through it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297990#M23051</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T14:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Python script to enter String &amp; Dates in existing fields</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297991#M23052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;James, thanks for all of your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe the button works as designed.&amp;nbsp; I am able to select a feature manually and then click the button and it goes right to the feature.&amp;nbsp; But, the original script calls for a RENUM value to be entered and that Parcel is selected.&amp;nbsp; Then, the script zooms to the feature.&amp;nbsp; Is it possible for a button to open user prompt to enter a string?&amp;nbsp; Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 15:04:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-enter-string-amp-amp-dates-in/m-p/297991#M23052</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2013-07-22T15:04:32Z</dc:date>
    </item>
  </channel>
</rss>

