<?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 Interactively select shapefile? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/interactively-select-shapefile/m-p/15380#M1208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was curious if anyone knew how I would go about creating a tool which allowed the user to select a shapefile from an interactive map, for example select a particular state from a shapefile of all the states in the U.S. and then the tool will use that particular state shapefile as the clipping extent for the tool.&amp;nbsp; I have a climate dataset for the entire United States and I would like the user to be able to select a particular state on a map so the climate dataset is clipped to just that state.&amp;nbsp; I know how to add the shapefile as a parameter on the tool's gooey, but instead of the user navigating to a shapefile saved somewhere on their computer, I would like them to be able to interactively select that state's shapefile on a map and then that shapefile will be used as the clip extent.&amp;nbsp; If anyone has an idea about how I would go about this please share, thanks!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Aug 2012 16:59:52 GMT</pubDate>
    <dc:creator>StephenFricke</dc:creator>
    <dc:date>2012-08-27T16:59:52Z</dc:date>
    <item>
      <title>Interactively select shapefile?</title>
      <link>https://community.esri.com/t5/python-questions/interactively-select-shapefile/m-p/15380#M1208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was curious if anyone knew how I would go about creating a tool which allowed the user to select a shapefile from an interactive map, for example select a particular state from a shapefile of all the states in the U.S. and then the tool will use that particular state shapefile as the clipping extent for the tool.&amp;nbsp; I have a climate dataset for the entire United States and I would like the user to be able to select a particular state on a map so the climate dataset is clipped to just that state.&amp;nbsp; I know how to add the shapefile as a parameter on the tool's gooey, but instead of the user navigating to a shapefile saved somewhere on their computer, I would like them to be able to interactively select that state's shapefile on a map and then that shapefile will be used as the clip extent.&amp;nbsp; If anyone has an idea about how I would go about this please share, thanks!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2012 16:59:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/interactively-select-shapefile/m-p/15380#M1208</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2012-08-27T16:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Interactively select shapefile?</title>
      <link>https://community.esri.com/t5/python-questions/interactively-select-shapefile/m-p/15381#M1209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I was curious if anyone knew how I would go about creating a tool which allowed the user to select a shapefile from an interactive map, for example select a particular state from a shapefile of all the states in the U.S. and then the tool will use that particular state shapefile as the clipping extent for the tool.&amp;nbsp; I have a climate dataset for the entire United States and I would like the user to be able to select a particular state on a map so the climate dataset is clipped to just that state.&amp;nbsp; I know how to add the shapefile as a parameter on the tool's gooey, but instead of the user navigating to a shapefile saved somewhere on their computer, I would like them to be able to interactively select that state's shapefile on a map and then that shapefile will be used as the clip extent.&amp;nbsp; If anyone has an idea about how I would go about this please share, thanks!!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Python is incapable of setting a data frame's clip geometry.&amp;nbsp; It has no arcpy.mapping method to do that.&amp;nbsp; So if that is what you mean by setting a clip extent then you must use the IMap.ClipGeometry ArcObjects interface.&amp;nbsp; I am programming an Add-In extension that will listen to AfterDraw events and watch a hidden text object in my map to get messages from Python to set a data frame clip after a long Python script.&amp;nbsp; If want your routine to use the shapefile in connection with the Clip geoprocessing tool that is a different matter (straight Python can do that), but I would normally assume that an interactive map involves dealing with data frame clipping.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Aug 2012 18:56:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/interactively-select-shapefile/m-p/15381#M1209</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2012-08-27T18:56:57Z</dc:date>
    </item>
  </channel>
</rss>

