<?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: I need Help on any Python script that can clip a data frame to a selected feature in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610686#M47691</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The adding the layers to the map and the overwriting would be a pretty simple fix.&amp;nbsp; As far as the exportLayer, would you just want it to clip every layer in the map?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Aug 2012 19:11:00 GMT</pubDate>
    <dc:creator>BruceBacia</dc:creator>
    <dc:date>2012-08-20T19:11:00Z</dc:date>
    <item>
      <title>I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610669#M47674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am in bear need of any python script that can clip the data frame extent to a selected feature, a script different from the clipping under the geoprocesssing tool?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2012 01:02:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610669#M47674</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-11T01:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610670#M47675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think this could be scripted something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Arguments:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The input feature class to clip&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Logic:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Get the extent of your current mxd through arcpy.mapping&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a polygon object using these coordinates, setting its spatial reference to that of the input feature class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Clip the input feature class to the geometry object&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Aug 2012 10:47:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610670#M47675</guid>
      <dc:creator>BruceBacia</dc:creator>
      <dc:date>2012-08-11T10:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610671#M47676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you wish to actually clip the data to fit the data frame? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or do you want the data frame to fit the selected feature? (zoom and / or pan)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The suggestion above more or less addresses the first option. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The second requires you to get the extent property of the selected feature polygon Geometry object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(Read "Reading polyline or polygon geometries" on the "Reading geometries" help page)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you then use the extent values to set the extent property of the data frame.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(read the "DataFrame" help page)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a bug in version 10.0 that sometimes ignores the setting of data frame extents.... so it is good practice to set it twice.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 13:43:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610671#M47676</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2012-08-13T13:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610672#M47677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This worked for me.&amp;nbsp; You zoom to the extent you want to clip to, open the script, and then select the layers in the drop down that you want to clip to that extent.&amp;nbsp; They are saved as shapefiles with the date and time in the same directory as your open mxd.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will need to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Add a script to a toolbox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Source it back to this code on your computer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;-Add a parameter "Select the layers you want to clip to this extent".&amp;nbsp; Data Type:&amp;nbsp; Feature Layer.&amp;nbsp; MultiValue:&amp;nbsp; Yes&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Run the script with an mxd open.&amp;nbsp; It will work on a single dataframe, but if you have multiple dataframes in your map, it will only work on the first dataframe.&amp;nbsp; It would need tweaking to work on maps with multiple dataframes.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
#ClipToExtent.py
#Clips selected feature layers to the extent of your current mxd
#written by Bruce Bacia, 8/12/2012
import arcpy,os,gc,time

#define layer to clip
exportLayer = arcpy.GetParameterAsText(0)
exportLayer = exportLayer.split(";")
#set map document to the current open mxd
mxd = arcpy.mapping.MapDocument("CURRENT")
path = mxd.filePath
#get the root path of the mxd
path = path.replace(os.path.basename(path),"")
#set the tool to overwrite output
arcpy.env.workspace = path
arcpy.env.overwriteOutput = True
#set the dataframe as a polygon
df = arcpy.mapping.ListDataFrames(mxd)[0]
dfAsFeature = arcpy.Polygon(arcpy.Array([df.extent.lowerLeft, df.extent.lowerRight, df.extent.upperRight, df.extent.upperLeft]),df.spatialReference)

#clip the layer to the dataframe extent polygon
#send the output feature class to the same folder as the mxd
for layer in exportLayer:
&amp;nbsp;&amp;nbsp;&amp;nbsp; outFC = path + layer + "_Clip_" + time.strftime('%m_%d_%Y_%H_%M') + ".shp"
&amp;nbsp;&amp;nbsp;&amp;nbsp; gc.collect()
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Clipping..... " + outFC)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(layer,dfAsFeature,outFC)
&amp;nbsp;&amp;nbsp;&amp;nbsp; gc.collect()
del mxd
del df
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:07:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610672#M47677</guid>
      <dc:creator>BruceBacia</dc:creator>
      <dc:date>2021-12-12T02:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610673#M47678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm assuming you wanted to clip a Selected layer to the current data frame extent.&amp;nbsp; If you wanted to change the dataframe's extent to the extent of the selected features and export, you would probably be better off right clicking on the layer and clicking data&amp;gt;export.&amp;nbsp; No scripting necessary&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 15:17:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610673#M47678</guid>
      <dc:creator>BruceBacia</dc:creator>
      <dc:date>2012-08-13T15:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610674#M47679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the suggestion, but its not working like the data frame clipping option.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 15:38:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610674#M47679</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-13T15:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610675#M47680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmmm...I guess you would need to be more descriptive as to what it is you are trying to do.&amp;nbsp; This script works great for clipping user-defined layers to the current extent of an open mxd and sending them to shapefiles.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 15:58:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610675#M47680</guid>
      <dc:creator>BruceBacia</dc:creator>
      <dc:date>2012-08-13T15:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610676#M47681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I do not believe that this questions is about clipping a feature or matching a data frame's extent rectangle to bound a feature.&amp;nbsp; I believe he is trying to do the clipping of a data frame to a shape as shown in &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s90000000q000000.htm"&gt;this help description&lt;/A&gt;&lt;SPAN&gt; where the data frame only displays mapped information inside or outside of a non-rectangular shape that is specified by the user.&amp;nbsp; I would also like in code to be able to reset the data frame to clip what is shown to the same shape as a feature.&amp;nbsp; I am sure it can be done with ArcObjects with the IMap.ClipGeometry property, but I do not see any data frame property that would let me do this in Python.&amp;nbsp; It seems the data frame extent property only takes rectangular coordinates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not figured out how to call ArcObjects from Python, but if someone knows how, it would be nice if they could share a way to call the ArcObjects IMap.ClipGeometry property from Python.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2012 19:24:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610676#M47681</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2012-08-13T19:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610677#M47682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks rfairhur24 thats exactly what im saying.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 00:34:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610677#M47682</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-14T00:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610678#M47683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I also want to create a custom form where i can enter a particular plot_no for a parcel layer, the layer definitionquery and a custom scale for may layout. I have tried to use the esri python addin to i did not get what i want. Please any suggestion would be highly appreciated. Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2012 00:40:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610678#M47683</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-14T00:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610679#M47684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i used the following python script to create a script tool to select an attribute of a particular feature, but it returns all the records of the feature specified in the FeatureClass;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.overwriteOutput = True&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Get the input parameters for the selection tool&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureClass = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQLStatement = arcpy.GetParameterAsText(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Select by Layer Attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(FeatureClass, "NEW_SELECTION", "")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Report a success message &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage("All done!")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;except:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Report an error messages&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddError("Could not complete the selection")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Report any error messages that the selection tool might have generated &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(arcpy.GetMessages())&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please any suggestions. Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2012 23:23:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610679#M47684</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-15T23:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610680#M47685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You did not use the SQLStatement parameter to filter the selection. I would revise the code as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
arcpy.env.overwriteOutput = True

try:
&amp;nbsp; # Get the input parameters for the selection tool
&amp;nbsp; FeatureClass = arcpy.GetParameterAsText(0)
&amp;nbsp; SQLStatement = arcpy.GetParameterAsText(1)

&amp;nbsp; # Select by Layer Attribute
&amp;nbsp; arcpy.SelectLayerByAttribute_management(FeatureClass, "NEW_SELECTION", SQLStatement)


&amp;nbsp; # Report a success message 
&amp;nbsp; arcpy.AddMessage("All done!")

except:
&amp;nbsp; # Report an error messages
&amp;nbsp; arcpy.AddError("Could not complete the selection")

&amp;nbsp; # Report any error messages that the selection tool might have generated 
&amp;nbsp; arcpy.AddMessage(arcpy.GetMessages())&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:41:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610680#M47685</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-12T16:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610681#M47686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks rfairhur24 for the nugget of information, but when i run the script it does not return any record(s)? Any other suggestion(s)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 20:41:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610681#M47686</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-16T20:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610682#M47687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks rfairhur24 for the nugget of information, but when i run the script it does not return any record(s)? Any other suggestion(s)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is your SQLStatement valid for selecting records?&amp;nbsp; Paste it into a Select By Attributes query on the feature class you have used in your model in ArcMap and run it to see what it selects.&amp;nbsp; If it does not select anything build a query that does select something and paste that working query into the tool within your model to see if it gets the same selection results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The selection results will not appear on your map, they will just appear as an output for use within the Model for another tool to use, so connect another tool that uses a feature selection and see if you get any output.&amp;nbsp; let me know what tool you used and publish your SQLStatement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are trying to get the selection to show up in the map you have open I believe that takes other Python code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 23:22:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610682#M47687</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2012-08-16T23:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610683#M47688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes the SQL Statement is valid for selecting records, and i intend to run the script tool in an active view not within a model builder. After the query is completed no record is selected even for the valid SQL Statement.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Aug 2012 20:42:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610683#M47688</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-18T20:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610684#M47689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have&amp;nbsp; tried using arcpy.AddMessage(SQLStatement) to see what exactly is being passed to select by attribute?&amp;nbsp; Also, you need to convert the feature class to a feature layer or table view prior to using select by attribute.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Aug 2012 21:43:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610684#M47689</guid>
      <dc:creator>BruceBacia</dc:creator>
      <dc:date>2012-08-18T21:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610685#M47690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks brucejr312 for the python script for clipping the layers data frame extent, i've been trying to use your script under a single button so that all the clipping processes would be done by the click of a botton but i can't get to hardcode the exportLayer = arcpy.GetParameterAsText(0) as i.e. (datalayer1, datalayer2, datalayer3 etc) instead of using the script as a script tool and i also want the results of the clipping process to be enabled and added to the dataframe by default and i also want the output to be overwritten each time i run the clip.Please can you profer a solution to this. Thanks once again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Aug 2012 19:34:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610685#M47690</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-19T19:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610686#M47691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The adding the layers to the map and the overwriting would be a pretty simple fix.&amp;nbsp; As far as the exportLayer, would you just want it to clip every layer in the map?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 19:11:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610686#M47691</guid>
      <dc:creator>BruceBacia</dc:creator>
      <dc:date>2012-08-20T19:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610687#M47692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes exactly&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 20:10:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610687#M47692</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-20T20:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: I need Help on any Python script that can clip a data frame to a selected feature</title>
      <link>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610688#M47693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Do you know of any arcpy script that can change an field attribute property named Bearing from double - numeric to double - direction ( radians &amp;amp; quadrant bearing) and field attribute property named Distance to numeric and rounding of 2 decimal places. Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 21:39:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/i-need-help-on-any-python-script-that-can-clip-a/m-p/610688#M47693</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2012-08-20T21:39:08Z</dc:date>
    </item>
  </channel>
</rss>

