<?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 Custom Add-in Tool (Arcpy) in Python AddIns Questions</title>
    <link>https://community.esri.com/t5/python-addins-questions/custom-add-in-tool-arcpy/m-p/800037#M63</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to make an add-in tool for ArcMap that will allow a user to draw a rectangle to export the visible layers in their MXD to shapefiles. I used the Python Add-in Wizard to create my add-in, and I modified the python script that executes the business logic of my tool like this:&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="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; pythonaddins

&lt;SPAN class="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;ToolClass2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;object&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"""Implementation for AddinTest20200513_addin.tool (Tool)"""&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;__init__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;enabled &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cursor &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;shape &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Rectangle"&lt;/SPAN&gt; 
    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;onRectangle&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; rectangle_geometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        extent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; rectangle_geometry
        output_location &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\Users\sipes_gene\Desktop\AddinTest20200513'&lt;/SPAN&gt;

        a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lowerLeft&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lowerRight&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;upperRight&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;upperLeft&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lowerLeft&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        boundary_poly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Polygon&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;)&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;
        lyrList &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;ListLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyr &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; lyrList&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visible &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                out_shp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; output_location &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;".shp"&lt;/SPAN&gt;
                arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByLocation_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Intersect'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; boundary_poly&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; &lt;SPAN class="string token"&gt;'New_Selection'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                copyFCs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CopyFeatures_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; output_location&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_shp&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"CLEAR_SELECTION"&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="keyword token"&gt;return&lt;/SPAN&gt; copyFCs&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;/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;&amp;nbsp;I know I am very close to pulling this off because when I run it in ArcMap it will return the first feature class in my TOC as a shapefile, based on the rectangle I drew, but then it stops and does not proceed to the rest of my feature classes. Somehow my loop isn't working correctly. I'm wondering if I need to put the array inside the loop?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/tag/arcpy scripting/tg-p" target="_blank"&gt;#arcpy scripting&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 09:15:49 GMT</pubDate>
    <dc:creator>GeneSipes1</dc:creator>
    <dc:date>2021-12-12T09:15:49Z</dc:date>
    <item>
      <title>Custom Add-in Tool (Arcpy)</title>
      <link>https://community.esri.com/t5/python-addins-questions/custom-add-in-tool-arcpy/m-p/800037#M63</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to make an add-in tool for ArcMap that will allow a user to draw a rectangle to export the visible layers in their MXD to shapefiles. I used the Python Add-in Wizard to create my add-in, and I modified the python script that executes the business logic of my tool like this:&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="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; pythonaddins

&lt;SPAN class="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;ToolClass2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;object&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"""Implementation for AddinTest20200513_addin.tool (Tool)"""&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;__init__&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;enabled &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cursor &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;
        self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;shape &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Rectangle"&lt;/SPAN&gt; 
    &lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;onRectangle&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;self&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; rectangle_geometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        extent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; rectangle_geometry
        output_location &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\Users\sipes_gene\Desktop\AddinTest20200513'&lt;/SPAN&gt;

        a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lowerLeft&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lowerRight&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;upperRight&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;upperLeft&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;add&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lowerLeft&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        boundary_poly &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Polygon&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;)&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;
        lyrList &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;ListLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyr &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; lyrList&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visible &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                out_shp &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; output_location &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;".shp"&lt;/SPAN&gt;
                arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByLocation_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Intersect'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; boundary_poly&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; &lt;SPAN class="string token"&gt;'New_Selection'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                copyFCs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CopyFeatures_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; output_location&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_shp&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByAttribute_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"CLEAR_SELECTION"&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="keyword token"&gt;return&lt;/SPAN&gt; copyFCs&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;/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;&amp;nbsp;I know I am very close to pulling this off because when I run it in ArcMap it will return the first feature class in my TOC as a shapefile, based on the rectangle I drew, but then it stops and does not proceed to the rest of my feature classes. Somehow my loop isn't working correctly. I'm wondering if I need to put the array inside the loop?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/tag/arcpy scripting/tg-p" target="_blank"&gt;#arcpy scripting&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:15:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-addins-questions/custom-add-in-tool-arcpy/m-p/800037#M63</guid>
      <dc:creator>GeneSipes1</dc:creator>
      <dc:date>2021-12-12T09:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Add-in Tool (Arcpy)</title>
      <link>https://community.esri.com/t5/python-addins-questions/custom-add-in-tool-arcpy/m-p/800038#M64</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably solved it already by yourself. In case not: Just remove the return statement and push the&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f5f2f0; color: #000000; font-family: monospace; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;RefreshActiveView&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #999999; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;)&lt;/SPAN&gt; statement to the end of the script at the same inset level as the for loup.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 10:04:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-addins-questions/custom-add-in-tool-arcpy/m-p/800038#M64</guid>
      <dc:creator>MarianneRohrbach</dc:creator>
      <dc:date>2020-07-23T10:04:50Z</dc:date>
    </item>
  </channel>
</rss>

