<?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: Batch clip using arcpy script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695134#M53891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Myla-Rae,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From your code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*********************&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create list of feature classes and loop through the feature classes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Features = [FC1, FC2, FC3, FC4, FC5, FC6, FC7, FC8]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for fc in Features:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output = os.path.join("G:/Test.gdb/ImpactedFeatures", fc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(Features, FloodLevel, Output)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*********************&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your FOR loop iterates through the list, but your call to CLIP is supplied with the whole list again as the first argument!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It should read: arcpy.Clip_analysis(fc, FloodLevel, Output)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Apr 2013 20:17:52 GMT</pubDate>
    <dc:creator>ToddGiberson</dc:creator>
    <dc:date>2013-04-17T20:17:52Z</dc:date>
    <item>
      <title>Batch clip using arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695128#M53885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Hi, I am a GIS student, just starting out with python, and I am working on a project in which I want to create a custom script tool to clip a list of feature classes in a municipality to a single clip feature representing flood extent (FloodLevel). Can I create a list of the feature classes and then loop through the list to accomplish this? Here is what I am trying, though I cannot get the script to work at this point. I get an error that says: 'list' object is not callable. And I am not sure how to properly provide the output name for multiple features at once.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;# Clip town features to a flood level polygon&lt;/SPAN&gt;
&lt;SPAN&gt;# Define input parameter for floodLevel polygon&lt;/SPAN&gt;
&lt;SPAN&gt;# Define infrastructure variables&lt;/SPAN&gt;

&lt;SPAN&gt;FloodLevel = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;
&lt;SPAN&gt;FC1 = "Town_Boundary"&lt;/SPAN&gt;
&lt;SPAN&gt;FC2 = "Parcels_2010"&lt;/SPAN&gt;
&lt;SPAN&gt;FC3 = "Buildings_2009"&lt;/SPAN&gt;
&lt;SPAN&gt;FC4 = "Trails"&lt;/SPAN&gt;
&lt;SPAN&gt;FC5 = "Banff_Roads"&lt;/SPAN&gt;
&lt;SPAN&gt;FC6 = "Water_Main"&lt;/SPAN&gt;
&lt;SPAN&gt;FC7 = "Storm_Main"&lt;/SPAN&gt;
&lt;SPAN&gt;FC8 = "Hydrant"&lt;/SPAN&gt;

&lt;SPAN&gt;# Create list of feature classes and loop through the feature classes&lt;/SPAN&gt;
&lt;SPAN&gt;Features = [FC1, FC2, FC3, FC4, FC5, FC6, FC7, FC8]&lt;/SPAN&gt;

&lt;SPAN&gt;# Clip features in list to the FloodLevel polygon feature&lt;/SPAN&gt;
&lt;SPAN&gt;for items in Features():&lt;/SPAN&gt;
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(Features, FloodLevel, "Features_clip")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions on how I could solve this scenario would be helpful!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Myla-Rae&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(Curtis Price formatted code block 4/29/2015)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:15:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695128#M53885</guid>
      <dc:creator>Myla-RaeBaldwin</dc:creator>
      <dc:date>2021-12-12T05:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Batch clip using arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695129#M53886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are trying to call your list as a function. And as your error says a list is not callable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should just need to modify these lines&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for item in Features:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(item, FloodLevel, "Features_clip")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:15:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695129#M53886</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2021-12-12T05:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Batch clip using arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695130#M53887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, this has solved my problem with the "uncallable list". I am still have difficulty clipping a list of features. I have tried a number of things, here is where I am now:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Clip town features to a flood level polygon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Define input parameter for floodLevel polygon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Define infrastructure variables&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FloodLevel = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FC1 = "Town_Boundary"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FC2 = "Parcels_2010"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FC3 = "Buildings_2009"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FC4 = "Trails"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FC5 = "Banff_Roads"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FC6 = "Water_Main"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FC7 = "Storm_Main"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FC8 = "Hydrant"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create list of feature classes and loop through the feature classes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Features = [FC1, FC2, FC3, FC4, FC5, FC6, FC7, FC8]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for fc in Features:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output = os.path.join("G:/Test.gdb/ImpactedFeatures", fc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(Features, FloodLevel, Output)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;------------------------------ &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get an error for the line referencing the arcpy.Clip_analysis...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;as well as this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\analysis.py", line 55, in Clip&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RuntimeError: Object: Error in executing tool&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 16:18:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695130#M53887</guid>
      <dc:creator>Myla-RaeBaldwin</dc:creator>
      <dc:date>2013-04-08T16:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Batch clip using arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695131#M53888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using the full paths to the data for the features in your list?&amp;nbsp; You could set up an env.workspace for the full path if they are all in the same workspace.&amp;nbsp; For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
arcpy.env.workspace = r'G:\Some\Path\file.gdb'

for item in Features:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(item, FloodLevel, "Features_clip")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is you can used the attached toolbox if you want. I wrote batch clip tool a while back, it seems to work pretty well.&amp;nbsp; There are 2 options.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Batch clips all feature classes in a workspace with an optional wildcard&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Uses the multivalue parameter to let the user select feature classes from different workspaces&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:15:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695131#M53888</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T05:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Batch clip using arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695132#M53889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you using the full paths to the data for the features in your list?&amp;nbsp; You could set up an env.workspace for the full path if they are all in the same workspace.&amp;nbsp; For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
arcpy.env.workspace = r'G:\Some\Path\file.gdb'

for item in Features:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(item, FloodLevel, "Features_clip")
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is you can used the attached toolbox if you want. I wrote batch clip tool a while back, it seems to work pretty well.&amp;nbsp; There are 2 options.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Batch clips all feature classes in a workspace with an optional wildcard and feature type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Uses the multivalue parameter to let the user select feature classes from different workspaces&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:15:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695132#M53889</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T05:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: clip of list of feature classes</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695133#M53890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello every body!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;My goal in my thesis is landscape metrics for Terrasar data.I need to clip (as a raster data) from the fishnet which are veriety of feature classes.Attach you can see this file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;after the parrent fishnet I made clip by building model as attach file. then By python code I made fishnet for every parent fishnet:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp = arcgisscripting.create(9.3)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.overwriteOutput = 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# input hard-coded but you can make it a script tool parameter to make it an interactive input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in_fc = r"X:\mohammadi\finalmunichGIS\munich.gdb\fc_parent" # this polygon feature class has several polygons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rows = gp.SearchCursor(in_fc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row = rows.Next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while row:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; feat = row.shape&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ext = feat.extent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; orig = str(ext.xmin) + " " + str(ext.ymin)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; yaxis = str(ext.xmin) + " " + str(ext.ymin + 100.00)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; opp_corner = str(ext.xmax) + " " + str(ext.ymax)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print orig, yaxis, opp_corner&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; out_fc = r"X:\mohammadi\finalmunichGIS\munich.gdb\fc_parent1_" + str(row.OBJECTID)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; result = gp.CreateFishnet_management(out_fc, orig, yaxis, "0", "0", "2", "2", opp_corner,"NO_LABELS","#","POLYGON")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(gp.GetMessages())&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = rows.Next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;del row, rows&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the next step I need to make clip as a raster file for every child fishnet*(it means like as for child clip as a attach file).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;what do you sugest a python code or modelbuilder?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I tried many python codes and models, but it didn,t work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;again I have to focus that the result of above python code was list of feature classes and beacause of that I face problem in making loops.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks alot&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;nedaaa&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 13:50:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695133#M53890</guid>
      <dc:creator>nedamohammadi1</dc:creator>
      <dc:date>2013-04-17T13:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Batch clip using arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695134#M53891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Myla-Rae,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From your code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*********************&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Create list of feature classes and loop through the feature classes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Features = [FC1, FC2, FC3, FC4, FC5, FC6, FC7, FC8]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for fc in Features:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output = os.path.join("G:/Test.gdb/ImpactedFeatures", fc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(Features, FloodLevel, Output)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*********************&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your FOR loop iterates through the list, but your call to CLIP is supplied with the whole list again as the first argument!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It should read: arcpy.Clip_analysis(fc, FloodLevel, Output)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 20:17:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695134#M53891</guid>
      <dc:creator>ToddGiberson</dc:creator>
      <dc:date>2013-04-17T20:17:52Z</dc:date>
    </item>
    <item>
      <title>Batch clip using arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695135#M53892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you so much for your answer to Myla!the problem which I have is my data which are feature classes inter the .gdb !so python don,t know that!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to make clip with data management from the files which are fishnet as feature classes!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I give you my code and .gdb file!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcgisscripting
import arcpy
gp = arcgisscripting.create(9.3)
gp.overwriteOutput = 1

# input hard-coded but you can make it a script tool parameter to make it an interactive input.
in_fc = r"X:\mohammadi\finalmunichGIS\munich.gdb\fc_parent1_" # this polygon feature class has several polygons.
fc_parent1_=[fc_parent1_1, fc_parent1_2, fc_parent1_3, fc_parent1_4, fc_parent1_5, fc_parent1_6, fc_parent1_7, fc_parent1_8
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,fc_parent1_9,fc_parent1_10, fc_parent1_11, fc_parent1_12, fc_parent1_13, fc_parent1_14, fc_parent1_15, fc_parent1_16
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , fc_parent1_17, fc_parent1_18, fc_parent1_19, fc_parent1_20]
 
rows = gp.SearchCursor(in_fc)
row = rows.Next()

while row:
&amp;nbsp;&amp;nbsp;&amp;nbsp; feat = row.shape
&amp;nbsp;&amp;nbsp;&amp;nbsp; ext = feat.extent
&amp;nbsp;&amp;nbsp;&amp;nbsp; orig = str(ext.xmin) + " " + str(ext.ymin)
&amp;nbsp;&amp;nbsp;&amp;nbsp; yaxis = str(ext.xmin) + " " + str(ext.ymin + 100.00)
&amp;nbsp;&amp;nbsp;&amp;nbsp; opp_corner = str(ext.xmax) + " " + str(ext.ymax)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print orig, yaxis, opp_corner
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; out_fc = r"X:\mohammadi\finalmunichGIS\munich.gdb\clip" # + str(row.OBJECTID)
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; result = arcpy.clip_management("X:\mohammadi\finalmunichGIS\Testdaten-original data\munich_subset.tif", "650923.51 5297968.73 743103.51 5375868.73" ,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "X:\mohammadi\finalmunichGIS\munich.gdb\clip","#", "#", "NONE")
&amp;nbsp;&amp;nbsp;&amp;nbsp; print(gp.GetMessages())

&amp;nbsp;&amp;nbsp;&amp;nbsp; row = rows.Next()

del row, rows&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope you can help me and again thank you !!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;nedaaa&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:15:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695135#M53892</guid>
      <dc:creator>nedamohammadi1</dc:creator>
      <dc:date>2021-12-12T05:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Batch clip rasters to fishnet using arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695136#M53893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Neda, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please post your Python code in a code block. [thread=48475]Here's how.[/thread]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. You may want to look into the Split Raster tool. It may be a lot easier to tile your data using that instead of making fishnets and using this scripting approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. I did some once off code (not tested) to help you with working out how a script would work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
# only import arcpy - don't use arcgisscripting/gp at 10.x
import arcpy
from arcpy import env
arcpy.env.overwriteOutput = True ## 1

# in_fc is your polygon feature class
in_fc = r"X:\mohammadi\finalmunichGIS\clip0ffishnet9000\shapefilesoffc\fc_parent1" 
# in_tif is your input
in_raster = "X:\mohammadi\finalmunichGIS\Testdaten-original data\munich_subset.tif"

# output location
outGDB = r"X:\mohammadi\finalmunichGIS\munich.gdb"

arcpy.MakeFeatureLayer_management(in_fc,lyrFC)
# get list of object ids
objIDs = []
objIDField = arcpy.Describe(lyrFC).OIDFieldName
Rows = arcpy.SearchCursor(lyrFC)
while Row in Rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; objIDs.append(Row.getValue(objIDField))
del Row, Rows

# temp polygons
tmpFC = "in_memory/tmpPoly"

# one by one clip raster to polygons
arcpy.env.workspace= outGDB
for objID in objIDs:
&amp;nbsp;&amp;nbsp;&amp;nbsp; where = "{0} = {1}".format(objIDField,objID)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByAttributes_management(lyrFC,where)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(lyrFC,tmpFC)
&amp;nbsp;&amp;nbsp;&amp;nbsp; ext = arcpy.Describe(tmpFC).Extent
&amp;nbsp;&amp;nbsp;&amp;nbsp; extString = "{0} {1} {2} {3}".format(ext.XMin, ext.YMin, ext.XMax, ext.YMax)
&amp;nbsp;&amp;nbsp;&amp;nbsp; out_raster = "clip{0}".format(objID)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_management(in_raster, extString, out_raster, tmpFC)
&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages(0)
arcpy.Delete_management(tmpFC)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:15:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695136#M53893</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T05:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Batch clip using arcpy script</title>
      <link>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695137#M53894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for this toolbox. It works great.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 14:54:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-clip-using-arcpy-script/m-p/695137#M53894</guid>
      <dc:creator>ScottHawkins</dc:creator>
      <dc:date>2013-09-26T14:54:34Z</dc:date>
    </item>
  </channel>
</rss>

