<?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: arcpy.da.Editor setup for tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103234#M7955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The last line definitely looks odd.&amp;nbsp; What is arcpy&lt;SPAN&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; returning?&amp;nbsp; Better yet, can you elaborate a bit more on what you are trying to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Feb 2017 13:26:46 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2017-02-17T13:26:46Z</dc:date>
    <item>
      <title>arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103233#M7954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;I am not sure how I should have my syntax to use this with a tool ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;# Set Editing&lt;/SPAN&gt;&lt;BR /&gt;workspace &lt;SPAN&gt;=&lt;/SPAN&gt; r&lt;SPAN&gt;'C:\xyz'&lt;/SPAN&gt;&lt;BR /&gt;edit &lt;SPAN&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN&gt;.&lt;/SPAN&gt;da&lt;SPAN&gt;.&lt;/SPAN&gt;Editor&lt;SPAN&gt;(&lt;/SPAN&gt;workspace&lt;SPAN&gt;)&lt;/SPAN&gt;&amp;nbsp; &lt;BR /&gt;edit&lt;SPAN&gt;.&lt;/SPAN&gt;startEditing&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;False&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt; &lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&amp;nbsp; &lt;BR /&gt;edit&lt;SPAN&gt;.&lt;/SPAN&gt;startOperation&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;edit &lt;SPAN&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Feb 2017 23:29:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103233#M7954</guid>
      <dc:creator>DevinUnderwood2</dc:creator>
      <dc:date>2017-02-16T23:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103234#M7955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The last line definitely looks odd.&amp;nbsp; What is arcpy&lt;SPAN&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt; returning?&amp;nbsp; Better yet, can you elaborate a bit more on what you are trying to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 13:26:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103234#M7955</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-02-17T13:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103235#M7956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want a user with the option to check the Start Editing after typing in the string FacilityID.&lt;/P&gt;&lt;P&gt;I am having trouble passing the selected feature&amp;nbsp;to&amp;nbsp;arcpy&lt;SPAN&gt;.&lt;/SPAN&gt;GetParameterAsText() tool parameter.&lt;/P&gt;&lt;P&gt;Also, I have used editing arcpy syntax.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/324936_tool.JPG" style="width: 720px; height: 353px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;#Set to current mxd and dataframe&lt;/SPAN&gt;
mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListDataFrames&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
df&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scale &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;350&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Set Editing&lt;/SPAN&gt;
workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\Users\abc.gdb'&lt;/SPAN&gt;
edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Editor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workspace&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; 
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; 
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;SPAN class="comment token"&gt;# Set the tool parameters&lt;/SPAN&gt;
InputFeatureClass &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
InputField &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
InputValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;SPAN class="comment token"&gt;# SQL expression used in selecting a feature&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# The equation needs to be enclosed with double quote marks, in addition, since the input FacilityID is string, it needs to be enclosed with #single quote marks. &lt;/SPAN&gt;
whereclause &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;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddFieldDelimiters&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;InputFeatureClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;InputField&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;InputValue&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#Select feature by facilityid (InputValue)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;InputFeatureClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; whereclause&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

df&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;zoomToSelectedFeatures&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RefreshActiveView&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&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;/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;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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:21:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103235#M7956</guid>
      <dc:creator>DevinUnderwood2</dc:creator>
      <dc:date>2021-12-11T06:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103236#M7957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the goal of this script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 16:49:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103236#M7957</guid>
      <dc:creator>MitchHolley1</dc:creator>
      <dc:date>2017-02-17T16:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103237#M7958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to make the edit session starting dependent on whether or not the Starting Editting box is checked, right now it runs regardless.&amp;nbsp; I set the result of GetParameterAsText(3) to a variable(InputEdit) then created an if statement that would run if that variable was True.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\Users\abc.gdb'&lt;/SPAN&gt;
mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListDataFrames&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
df&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;scale &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;350&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Set the tool parameters&lt;/SPAN&gt;
InputFeatureClass &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
InputField &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
InputValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
InputEdit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; InputEdit&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#Starting Editing Session&lt;/SPAN&gt;
&amp;nbsp; edit &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Editor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workspace&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp; edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp; 
&amp;nbsp; edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;SPAN class="comment token"&gt;# SQL expression used in selecting a feature&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# The equation needs to be enclosed with double quote marks, in addition, since the input FacilityID is string, it needs to be enclosed with #single quote marks. &lt;/SPAN&gt;
whereclause &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;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddFieldDelimiters&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;InputFeatureClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;InputField&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;InputValue&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#Select feature by facilityid (InputValue)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;InputFeatureClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"NEW_SELECTION"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; whereclause&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

df&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;zoomToSelectedFeatures&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;RefreshActiveView&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&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;/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;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;/P&gt;&lt;P&gt;Not sure how you would logic the ending of the edit session into your code, since it seems like what you want your code to do is zoom to the select feature ID and edit if they choose.&amp;nbsp; You might have the user close the editting session within the map document itself when they are done.&amp;nbsp; What sort of edits would someone be doing to this feature(geometry, attributes, etc.)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:21:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103237#M7958</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2021-12-11T06:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103238#M7959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the feedback. You are exactly correct that I want the user to use the map document&amp;nbsp;default tool to stop and save edits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most edits will be attributes but some point feature creation and lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will work on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 17:55:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103238#M7959</guid>
      <dc:creator>DevinUnderwood2</dc:creator>
      <dc:date>2017-02-17T17:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103239#M7960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not working yet based on your suggestions. So it just starts an edit session ? How does it know to edit the selected feature, I am not seeing it in the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 18:01:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103239#M7960</guid>
      <dc:creator>DevinUnderwood2</dc:creator>
      <dc:date>2017-02-17T18:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103240#M7961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are the feature class you putting into the tool in the same workspace you are setting for the editting workspace?&amp;nbsp; That would be necessary for you to be able to edit the features, since you are setting the workspace to be editted, not the feature itself.&amp;nbsp; Any feature class in that workspace would be editable at that point.&amp;nbsp; Any edits you want to make would have to be within the map document itself, unless you change some code to do it within the program.&amp;nbsp; So right now all the code I wrote should do is use the current map document, subset a feature class based on an input field and value, zoom to it and start an editting session to allow edits on that feature(if it is in the workspace we set for editting).&amp;nbsp; The user would then have to make the changes to the geometry and/or attributes, save and close the edit session within the map document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing you were setting this up for basic GIS users to easily view and possibly edit a specific feature?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 18:15:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103240#M7961</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2017-02-17T18:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103241#M7962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the feature class is in the same workspace .gdb. I am creating this for basis GIS users, it would be very convenient.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 18:24:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103241#M7962</guid>
      <dc:creator>DevinUnderwood2</dc:creator>
      <dc:date>2017-02-17T18:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103242#M7963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is something missing, as it is still not working. Just not sure what.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 18:41:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103242#M7963</guid>
      <dc:creator>DevinUnderwood2</dc:creator>
      <dc:date>2017-02-17T18:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103243#M7964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah just tested that in a map document.&amp;nbsp; It opens an editting session in memory, but does not actually show the editting session within the map document itself.&amp;nbsp; I can edit the attribute table manually of the feature but can't manually edit geometry.&amp;nbsp; I thought the map document would recognize the edit session, but apparently not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 18:54:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103243#M7964</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2017-02-17T18:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103244#M7965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting, I can't even edit in the attribute table.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 18:58:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103244#M7965</guid>
      <dc:creator>DevinUnderwood2</dc:creator>
      <dc:date>2017-02-17T18:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.Editor setup for tool</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103245#M7966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't write out a whole script tool to use, I just entered all the values in ArcMap's python window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also interesting is when I opened and closed an editing session within the map document manually, it closed out my in memory editting session.&amp;nbsp; Apparently their aren't many pythonic ways to get a map document to check if there is an edit session ongoing.&amp;nbsp; Found a few other threads that could point you in the right direction, but I'm not sure using arcpy.da.Editor is going to do the trick by itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://gis.stackexchange.com/questions/61708/how-to-check-via-arcpy-if-arcmap-is-currently-in-an-edit-session-or-not"&gt;http://gis.stackexchange.com/questions/61708/how-to-check-via-arcpy-if-arcmap-is-currently-in-an-edit-session-or-not&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone else has some suggestions, I'm all ears.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Feb 2017 19:21:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-da-editor-setup-for-tool/m-p/103245#M7966</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2017-02-17T19:21:13Z</dc:date>
    </item>
  </channel>
</rss>

