<?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: Printing an add_to_selection features' message. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447794#M35125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, maybe you could try using the GetCount method? It says in the documentation that "&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;If the input is a layer or table view containing a selected set of records, only the selected records will be counted." So you could set the result of that method to a variable and then print that variable.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;&lt;A class="link-titled" href="https://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/get-count.htm" title="https://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/get-count.htm"&gt;Get Count—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 May 2020 00:43:09 GMT</pubDate>
    <dc:creator>Katie_Clark</dc:creator>
    <dc:date>2020-05-04T00:43:09Z</dc:date>
    <item>
      <title>Printing an add_to_selection features' message.</title>
      <link>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447791#M35122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="comment token"&gt;#Creating features list for Buffer Analysis&lt;/SPAN&gt;
fcList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"schools.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"BroomeGroceryStores.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fcList&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#Selecting schools that fall within 805 meters of a grocery store&lt;/SPAN&gt;
buffList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fcList&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    buff &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Buffer_analysis&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"BroomeGroceryStoress.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Results/BroomeGroceryStores_buffer.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"805 METERS"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    buffList&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;buff&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetMessages&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; buff &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; buffList&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SelectLayerByLocation_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"schools"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"WITHIN"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; buff&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;"ADD_TO_SELECTION"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Done"&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way to print out how many features are selected under a buffer for analysis purposes using Python? I have the following script where I put an 805-meter buffer around grocery stores, and brought in a shapefile called schools and wanted to know how many schools fall within 805 meters (which is 0.5 miles) of a grocery store? When I run the script it shows me the selection of schools, but I was wondering if there was a way I can make the program print or create table full of values on&amp;nbsp;how many features are selected under the buffering circle. Please let me know. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:00:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447791#M35122</guid>
      <dc:creator>ShalinR</dc:creator>
      <dc:date>2021-12-11T20:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Printing an add_to_selection features' message.</title>
      <link>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447792#M35123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might get a better chance at a response if you post these types of questions to the &lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt;‌ section of Geonet. Also, as &lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt;‌ mentioned in another post of yours, it's much easier to help and be able to reference line numbers if you use syntax highlighting and put your code in the actual post, rather than in an image attachment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;IMG class="image-1 jive-image" height="109" src="https://community.esri.com/legacyfs/online/490762_pastedImage_1.png" width="544" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;IMG class="image-2 jive-image" height="138" src="https://community.esri.com/legacyfs/online/490769_pastedImage_2.png" width="545" /&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;&lt;IMG class="image-3 jive-image" height="370" src="https://community.esri.com/legacyfs/online/490770_pastedImage_3.png" width="268" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 May 2020 15:04:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447792#M35123</guid>
      <dc:creator>Katie_Clark</dc:creator>
      <dc:date>2020-05-03T15:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Printing an add_to_selection features' message.</title>
      <link>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447793#M35124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, will keep this in mind for future reference. But also with the community thing, it didn't really let me put in GeoNet community as general, so I put in ArcGIS, because it had higher number of members.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 May 2020 23:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447793#M35124</guid>
      <dc:creator>ShalinR</dc:creator>
      <dc:date>2020-05-03T23:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Printing an add_to_selection features' message.</title>
      <link>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447794#M35125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, maybe you could try using the GetCount method? It says in the documentation that "&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;If the input is a layer or table view containing a selected set of records, only the selected records will be counted." So you could set the result of that method to a variable and then print that variable.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;&lt;A class="link-titled" href="https://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/get-count.htm" title="https://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/get-count.htm"&gt;Get Count—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2020 00:43:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447794#M35125</guid>
      <dc:creator>Katie_Clark</dc:creator>
      <dc:date>2020-05-04T00:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Printing an add_to_selection features' message.</title>
      <link>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447795#M35126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I answered this is your quasi-duplicate 'discussion'&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/252736-obtaining-message-of-features-selected-under-a-buffer"&gt;https://community.esri.com/thread/252736-obtaining-message-of-features-selected-under-a-buffer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2020 01:01:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/printing-an-add-to-selection-features-message/m-p/447795#M35126</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-05-04T01:01:39Z</dc:date>
    </item>
  </channel>
</rss>

