<?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: Help with Python script and user input in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506586#M39840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The main advice for you is that this will require the use of a Python add-in, as you want to interact with features your ArcMap edit session. Here's some info to get you started:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Free video: &lt;/SPAN&gt;&lt;A href="http://training.esri.com/gateway/index.cfm?fa=catalog.webCourseDetail&amp;amp;courseID=2485"&gt;Creating Desktop Add-ins Using Python (for ArcGIS 10.1)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Desktop 10.1 Help: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000025000000"&gt;ArcGIS Desktop Python Add-Ins&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;UPDATE: On rereading your use case, since it seems the only interactive part is selecting parcels and entering text information, you may be able to do this with a Python script tool that accepts a feature set as input. This would be easier than building an add-in.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Jun 2013 15:48:17 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2013-06-03T15:48:17Z</dc:date>
    <item>
      <title>Help with Python script and user input</title>
      <link>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506585#M39839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If anyone can help with this I would be very appreciative.&amp;nbsp; I have written some python scripts in the past, but they are mostly used to automate parts of my projects. Now I have to create an application to assist&amp;nbsp; some of my users that are less familiar with editing with with an edit session.&amp;nbsp; The users would need to select one or more parcels and those polygons would be copied with the unique ids for each parcel into another feature class in SDE.&amp;nbsp; My users would then need to enter data into fields for project for the editor name, edit date, project status and a comment field.&amp;nbsp; I have looked at the forums and it looks like the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://wiki.python.org/moin/TkInter" rel="nofollow" target="_blank"&gt;Tkinter&lt;/A&gt;&lt;SPAN&gt; and wxPython might be able to help, but many of the comments say that they are a little buggy.&amp;nbsp; Is this possible to create with Python?&amp;nbsp; Also can I limit the users input using domains or does python not capable of using coded or date domains?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 15:34:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506585#M39839</guid>
      <dc:creator>DavidDenham</dc:creator>
      <dc:date>2013-06-03T15:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Python script and user input</title>
      <link>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506586#M39840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The main advice for you is that this will require the use of a Python add-in, as you want to interact with features your ArcMap edit session. Here's some info to get you started:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Free video: &lt;/SPAN&gt;&lt;A href="http://training.esri.com/gateway/index.cfm?fa=catalog.webCourseDetail&amp;amp;courseID=2485"&gt;Creating Desktop Add-ins Using Python (for ArcGIS 10.1)&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Desktop 10.1 Help: &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000025000000"&gt;ArcGIS Desktop Python Add-Ins&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;UPDATE: On rereading your use case, since it seems the only interactive part is selecting parcels and entering text information, you may be able to do this with a Python script tool that accepts a feature set as input. This would be easier than building an add-in.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 15:48:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506586#M39840</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-06-03T15:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Python script and user input</title>
      <link>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506587#M39841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I have read over the python help files in the past, but I need to go over the addin section.&amp;nbsp; The thing I really need to know before I spend too much time on this, is if it is possible to create this tool in python or if I need to find another way.&amp;nbsp; The users will need to select one or more parcels and the application will copy these polygons into another feature class.&amp;nbsp; The user will need to enter a project name, an editor name (using a coded domain), a project status (coded domain) and an edit date.&amp;nbsp; Is it possible to use coded domains limit what the users can enter in Python? Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 02:04:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506587#M39841</guid>
      <dc:creator>DavidDenham</dc:creator>
      <dc:date>2013-06-05T02:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Python script and user input</title>
      <link>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506588#M39842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; The thing I really need to know before I spend too much time on this, is if it is possible to create this tool in python or if I need to find another way.&amp;nbsp;&amp;nbsp; (again) Is it possible to use coded domains limit what the users can enter in Python? Thanks.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you set this up as a tool, this is very straightforward. You can write validation code can detect the domains attached to a field (it's property of a field), go look at the domains, and assign them to a filter input. No problem there. (For simplicity, you could just hardcode the domains if they are static.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See the section in the help Programming&amp;nbsp; a Tool Validator Class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Doing this as a geoprocessing tool is much easier as you let the tool validation (which all users are already familiar with) do your interface - no need to futz with Tkinter etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note if you do this, it's a good idea to have a check in your code that only a couple parcels are selected so you don't accidentally wipe the database. You can either do this in validation code (preferred) or in the main tool code as an error.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 15:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506588#M39842</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-06-05T15:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Python script and user input</title>
      <link>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506589#M39843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yes. &lt;BR /&gt;&lt;BR /&gt;If you set this up as a tool, this is very straightforward. You can write validation code can detect the domains attached to a field (it's property of a field), go look at the domains, and assign them to a filter input. No problem there. (For simplicity, you could just hardcode the domains if they are static.&lt;BR /&gt;&lt;BR /&gt;See the section in the help Programming&amp;nbsp; a Tool Validator Class.&lt;BR /&gt;&lt;BR /&gt;Doing this as a geoprocessing tool is much easier as you let the tool validation (which all users are already familiar with) do your interface - no need to futz with Tkinter etc.&lt;BR /&gt;&lt;BR /&gt;Note if you do this, it's a good idea to have a check in your code that only a couple parcels are selected so you don't accidentally wipe the database. You can either do this in validation code (preferred) or in the main tool code as an error.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I really appreciate all of your suggestions with this project.&amp;nbsp; My job generally consists of supporting 35+ users and performing custom analysis so I do not get to do a lot of programming.&amp;nbsp; I am using the append tool to add the selected feature or features to the target feature class. I am trying to use a feature set to ensure the the users do not append all of our parcels by accident, but it is not asking the user to select features.&amp;nbsp; Instead all I get is a pull down list of all of the feature classes in the project.&amp;nbsp; I can only find these two links about feature sets &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/A_quick_tour_of_using_Feature_Set_and_Record_Set/002w00000023000000/"&gt;here&lt;/A&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Using_Feature_Set_and_Record_Set_in_ModelBuilder/002w0000004t000000/"&gt;here&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; Any ideas about what I am not doing right?&amp;nbsp; [ATTACH=CONFIG]25035[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 21:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506589#M39843</guid>
      <dc:creator>DavidDenham</dc:creator>
      <dc:date>2013-06-05T21:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Python script and user input</title>
      <link>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506590#M39844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm sorry,&amp;nbsp; I'm pretty sure I led you wrong by not reading carefully enough. What you want to supply here is (I think) a feature layer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The user workflow would be to set the layer you're working with as the only selectable layer ( you could do this in a map document you give them to use before they start). Then select features, then run your tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you pass a feature layer instead of a parameter, the selected features in that feature layer are the only ones the tool in the script will use, for example, as copy features or append input.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 21:26:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506590#M39844</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-06-05T21:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Python script and user input</title>
      <link>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506591#M39845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From what I am reading &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/A_quick_tour_of_using_Feature_Set_and_Record_Set/002w00000023000000/"&gt;here&lt;/A&gt;&lt;SPAN&gt; the feature set will allow me to require my users to select one or more parcels when the tool is run.&amp;nbsp; I need to do this because I am using the Append tool and there is the possibility that if a selection is not made then all of the parcels are appended to my target feature class.&amp;nbsp; The possibility of user error is also the reason that I need to use coded domains in this tool.&amp;nbsp; Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 15:16:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506591#M39845</guid>
      <dc:creator>DavidDenham</dc:creator>
      <dc:date>2013-06-06T15:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Python script and user input</title>
      <link>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506592#M39846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm pretty sure in this context the feature sets are for &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;creating new features&lt;/SPAN&gt;&lt;SPAN&gt; - not selecting existing ones, which I thought was your use case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I said both of these issues (no features selected, coded domains) can be handled with tool validation with a feature layer input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You also may want to validate your feature layer input to make sure 1) it's the feature layer you want and 2) it's a feature layer and not a feature class (which is supported in the dialog).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 16:34:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/help-with-python-script-and-user-input/m-p/506592#M39846</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-06-06T16:34:31Z</dc:date>
    </item>
  </channel>
</rss>

