hi all, I'm confused about something. I just took an ESRI Python course that points out the distinction between feature classes and feature layers, and that some tools require the use of feature layers. Now I need to clip one polygon feature class to another and the Clip analysis tool seems to be what I need. The documentation for this tool says that both the "in_features" and the "clip_features" need to be Feature Layers as opposed to Feature Classes. But in their Clip sample code, they just use shapefiles as is within the tool parameters (code below).
My question is: Why do they NOT need to use the MakeFeatureLayer tool on the in_features and clip_features shapefiles to make Feature Layers for use in the tool? Thanks!
Dan
<SPAN class="c"># Name: Clip_Example2.py</SPAN><BR /><SPAN class="c"># Description: Clip major roads that fall within the study area. </SPAN><BR /><BR /><SPAN class="c"># Import system modules</SPAN><BR /><SPAN class="kn">import</SPAN> <SPAN class="nn">arcpy</SPAN><BR /><SPAN class="kn">from</SPAN> <SPAN class="nn">arcpy</SPAN> <SPAN class="kn">import</SPAN> <SPAN class="n">env</SPAN><BR /><BR /><SPAN class="c"># Set workspace</SPAN><BR /><SPAN class="n">env</SPAN><SPAN class="o">.</SPAN><SPAN class="n">workspace</SPAN> <SPAN class="o">=</SPAN> <SPAN class="s">"C:/data"</SPAN><BR /><BR /><SPAN class="c"># Set local variables</SPAN><BR /><SPAN class="n">in_features</SPAN> <SPAN class="o">=</SPAN> <SPAN class="s">"majorrds.shp"</SPAN><BR /><SPAN class="n">clip_features</SPAN> <SPAN class="o">=</SPAN> <SPAN class="s">"study_quads.shp"</SPAN><BR /><SPAN class="n">out_feature_class</SPAN> <SPAN class="o">=</SPAN> <SPAN class="s">"C:/output/studyarea.shp"</SPAN><BR /><SPAN class="n">xy_tolerance</SPAN> <SPAN class="o">=</SPAN> <SPAN class="s">""</SPAN><BR /><BR /><SPAN class="c"># Execute Clip</SPAN><BR /><SPAN class="n">arcpy</SPAN><SPAN class="o">.</SPAN><SPAN class="n">Clip_analysis</SPAN><SPAN class="p">(</SPAN><SPAN class="n">in_features</SPAN><SPAN class="p">,</SPAN> <SPAN class="n">clip_features</SPAN><SPAN class="p">,</SPAN> <SPAN class="n">out_feature_class</SPAN><SPAN class="p">,</SPAN> <SPAN class="n">xy_tolerance</SPAN><SPAN class="p">)</SPAN><BR />