<?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 Multiple clip using a feature class in a geodatabase in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/multiple-clip-using-a-feature-class-in-a/m-p/156257#M12045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,I´m a student and new in python. As an excercise I have to create an script, which, using a feature class existing in a geodatabase, should clip other featureclasses existing in the same geodatabase (but not clipping itself) and add the prefix "NewFile" to the feature classes that were clipped, however, I arrive to some point where I´m lost and don´t know exactly how to finish the script, can somebody help me with that?&lt;/P&gt;&lt;P&gt;Thank you in advance! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;import arcpy, os&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;from arcpy import env&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;arcpy.env.workspace = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;clipFeatures = 'D:\\datosvalle\\Valle.mdb\\Santiago_de_cali'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;outWorkspace = 'D:\\datosvalle\\Valle.mdb'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;clusterTolerance = ""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;try:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcs = arcpy.ListFeatureClasses()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for fc in fcs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureClassName = arcpy.ValidateTableName("Newfile_"+fc, outWorkspace)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFeatureClass = os.path.join(outWorkspace, featureClassName)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if fc &amp;lt;&amp;gt; os.path.basename (clipFeatures):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(fc, clipFeatures, outFeatureClass, clusterTolerance)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;except: arcpy.AddMessage(arcpy.GetMessages(2))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;print "The files were correctly clipped"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Sep 2015 22:10:48 GMT</pubDate>
    <dc:creator>AgustinBejerman</dc:creator>
    <dc:date>2015-09-24T22:10:48Z</dc:date>
    <item>
      <title>Multiple clip using a feature class in a geodatabase</title>
      <link>https://community.esri.com/t5/python-questions/multiple-clip-using-a-feature-class-in-a/m-p/156257#M12045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,I´m a student and new in python. As an excercise I have to create an script, which, using a feature class existing in a geodatabase, should clip other featureclasses existing in the same geodatabase (but not clipping itself) and add the prefix "NewFile" to the feature classes that were clipped, however, I arrive to some point where I´m lost and don´t know exactly how to finish the script, can somebody help me with that?&lt;/P&gt;&lt;P&gt;Thank you in advance! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;import arcpy, os&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;from arcpy import env&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;arcpy.env.workspace = arcpy.GetParameterAsText(0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;clipFeatures = 'D:\\datosvalle\\Valle.mdb\\Santiago_de_cali'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;outWorkspace = 'D:\\datosvalle\\Valle.mdb'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;clusterTolerance = ""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;try:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fcs = arcpy.ListFeatureClasses()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for fc in fcs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureClassName = arcpy.ValidateTableName("Newfile_"+fc, outWorkspace)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFeatureClass = os.path.join(outWorkspace, featureClassName)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if fc &amp;lt;&amp;gt; os.path.basename (clipFeatures):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Clip_analysis(fc, clipFeatures, outFeatureClass, clusterTolerance)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;except: arcpy.AddMessage(arcpy.GetMessages(2))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3334ca; font-size: 10pt;"&gt;print "The files were correctly clipped"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2015 22:10:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-clip-using-a-feature-class-in-a/m-p/156257#M12045</guid>
      <dc:creator>AgustinBejerman</dc:creator>
      <dc:date>2015-09-24T22:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple clip using a feature class in a geodatabase</title>
      <link>https://community.esri.com/t5/python-questions/multiple-clip-using-a-feature-class-in-a/m-p/156258#M12046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are you having a problem with?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 00:59:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-clip-using-a-feature-class-in-a/m-p/156258#M12046</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-09-25T00:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple clip using a feature class in a geodatabase</title>
      <link>https://community.esri.com/t5/python-questions/multiple-clip-using-a-feature-class-in-a/m-p/156259#M12047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome to the site.&amp;nbsp; It is preferable practice to indicate&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;what you have done,&lt;/LI&gt;&lt;LI&gt;the results of any script&lt;UL&gt;&lt;LI&gt;did it fail? and if so what is the exact error message and a listing of thinputs to it&lt;/LI&gt;&lt;LI&gt;it worked, but you don't like it... changes you want&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your response suggests that you got lost somewhere...but the script looks not bad.&amp;nbsp; Did you get lost early on? if so how did you write the rest of the script?&amp;nbsp; So basically, as Freddie says...what's up? what happened or didn't?&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 01:12:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-clip-using-a-feature-class-in-a/m-p/156259#M12047</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-09-25T01:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple clip using a feature class in a geodatabase</title>
      <link>https://community.esri.com/t5/python-questions/multiple-clip-using-a-feature-class-in-a/m-p/156260#M12048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think what you need to do is remove the clip fc from the list&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="_jivemacro_uid_14431954812377039 jive_macro_code jive_text_macro" data-renderedposition="29_8_912_16" jivemacro_uid="_14431954812377039"&gt;&lt;P&gt;fcs.remove('Santiago_de_cali')&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 15:38:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/multiple-clip-using-a-feature-class-in-a/m-p/156260#M12048</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-09-25T15:38:05Z</dc:date>
    </item>
  </channel>
</rss>

