<?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: Pythonaddins tool for selecting polygon and export some specific attributes to csv in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/pythonaddins-tool-for-selecting-polygon-and-export/m-p/589566#M46215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yamin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if you still have this question. I haven't seen any users that have already created a tool similar to what you're needing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you having trouble creating this tool on your end? If so, could you provide a code sample showing what you have so far? I would think that you would want to create a tool within a python addin that implements the following logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Wire into the tool's onMouseDownMap event. This event will provide you with the xy location of where the user clicks.&lt;/LI&gt;&lt;LI&gt;Implement logic that iterates through the layers in the TOC that you'd need to review and either use the selection Geoprocessing tools or cursors with a spatial filter to determine which layers have data that intersect where the user clicked.&lt;/LI&gt;&lt;LI&gt;Use Geoprocessing to select the intersecting features and export them to a csv file via the&amp;nbsp; TableToTable conversion tool or using python create the csv file and write the needed records to using cursors.&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Sep 2015 22:27:28 GMT</pubDate>
    <dc:creator>FreddieGibson</dc:creator>
    <dc:date>2015-09-01T22:27:28Z</dc:date>
    <item>
      <title>Pythonaddins tool for selecting polygon and export some specific attributes to csv</title>
      <link>https://community.esri.com/t5/python-questions/pythonaddins-tool-for-selecting-polygon-and-export/m-p/589565#M46214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a pythonaddins tool or script with which I can click on a feature class polygon to be selected and export some specific attributes to a csv? My must have requirements are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Pythonaddins, so that I can use the tool and click anywhere on polygon feature class.&lt;/P&gt;&lt;P&gt;2. There could be multiple feature classes, so I need to loop through all of them to get specific attributes to export.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[I think this would be very similar to identifier tool. The reason why we need to custom develop this, is to be able to export data to a csv file whenever a click event occurs.]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jun 2015 16:44:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pythonaddins-tool-for-selecting-polygon-and-export/m-p/589565#M46214</guid>
      <dc:creator>YaminNoor</dc:creator>
      <dc:date>2015-06-15T16:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pythonaddins tool for selecting polygon and export some specific attributes to csv</title>
      <link>https://community.esri.com/t5/python-questions/pythonaddins-tool-for-selecting-polygon-and-export/m-p/589566#M46215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yamin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if you still have this question. I haven't seen any users that have already created a tool similar to what you're needing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you having trouble creating this tool on your end? If so, could you provide a code sample showing what you have so far? I would think that you would want to create a tool within a python addin that implements the following logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Wire into the tool's onMouseDownMap event. This event will provide you with the xy location of where the user clicks.&lt;/LI&gt;&lt;LI&gt;Implement logic that iterates through the layers in the TOC that you'd need to review and either use the selection Geoprocessing tools or cursors with a spatial filter to determine which layers have data that intersect where the user clicked.&lt;/LI&gt;&lt;LI&gt;Use Geoprocessing to select the intersecting features and export them to a csv file via the&amp;nbsp; TableToTable conversion tool or using python create the csv file and write the needed records to using cursors.&lt;/LI&gt;&lt;/OL&gt;&lt;UL&gt;&lt;LI&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 22:27:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/pythonaddins-tool-for-selecting-polygon-and-export/m-p/589566#M46215</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-09-01T22:27:28Z</dc:date>
    </item>
  </channel>
</rss>

