AnsweredAssumed Answered

ERROR 000670: output Output Feature Class is same as input Input Features

Question asked by caherbu on Mar 17, 2016
Latest reply on Mar 17, 2016 by Dan_Patterson

Good day,

What should I do to avoid this error

 

 

Traceback (most recent call last):

  File "G:\MB\script\Model3C.py", line 37, in <module>

    arcpy.Select_analysis(Input_Features, Output_Feature_Class, Expression)

  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\analysis.py", line 84, in Select

    raise e

ExecuteError: Failed to execute. Parameters are not valid.

ERROR 000670: output Output Feature Class is same as input Input Features

Failed to execute (Select).

-------------------------------------------------------------------------------------------------------------------------------------------------------

This is my code:

 

 

# Import arcpy module

import arcpy

 

 

# Load required toolboxes

#arcpy.ImportToolbox("Model Functions")

 

 

# Script arguments

Input_Features = arcpy.GetParameterAsText(0)

 

 

Expression = arcpy.GetParameterAsText(1)

 

 

Group_By_Fields = arcpy.GetParameterAsText(2)

 

 

NOMBRE__Value_ = arcpy.GetParameterAsText(3)

if NOMBRE__Value_ == '#' or not NOMBRE__Value_:

    NOMBRE__Value_ = "C:\\Users\\CARLOSH\\Documents\\ArcGIS\\Default.gdb\\NOMBRE_CONSTANTE_%Value%" # provide a default value if unspecified

 

 

Skip_Null_Values = arcpy.GetParameterAsText(4)

if Skip_Null_Values == '#' or not Skip_Null_Values:

    Skip_Null_Values = "false" # provide a default value if unspecified

 

 

# Local variables:

Output_Feature_Class = Input_Features

Selected_Features = Output_Feature_Class

Value = Output_Feature_Class

 

 

# Process: Select

arcpy.Select_analysis(Input_Features, Output_Feature_Class, Expression)

 

 

# Process: Iterate Feature Selection

arcpy.IterateFeatureSelection_mb(Output_Feature_Class, Group_By_Fields, Skip_Null_Values)

 

 

# Process: Copy Features

arcpy.CopyFeatures_management(Selected_Features, NOMBRE__Value_, "", "0", "0", "0")

Outcomes