Using ArcGIS 10 I am able to incorporate "Select by Attributes" directly into my model. I then want to process the selected features. "Select by Location" is working successful, but connecting it to the following tools (e.g. Dissolve/Eliminate,...) always gives this error message:
"Failed to execute, parameters are not valid. Error 000840. The value is not a feature layer."
The output shapefile is somehow a so-called "Table View/Raster Layer/Mosaic Layer", although the Input Layer of "Select by Attributes" is a Feature Layer.
How to deal with this? If I put "Make Feature Layer" or "Copy Features" between "Select by Attributes" and the following tool, I get the same error message (see above).
Yeah, input was a shapefile. SQL Expression seems to be alright. I will try out the version with using the sql expression directly in the "Make Feature Layer" tool and connecting the output with the next tool.
I can post a graphic of the extraction of the concerned part of my model tomorrow. Right now I can't check if SP2 is installed, will do that tomorrow.
Is "select layer by attributes" not intended to be applied on feature classes/ shapefiles?
Alright! Good to know...I suspected something like that, but was unsure since the "Select by Attributes"-Tool itself gave no error message , but just the following tools (the "Results"- Window always showed that "select by attributes" succeeded).
Can you post an image showing the tools in the model that are upstream of the Eliminate tool?
Also try this: Use Make Feature Layer tool to create a feature layer. Don't use any expression in this. Then use the Select Layer By Attribute tool to make a selection in the layer and connect the output of Select Layer By Attribute to the Eliminate tool. This should work.
The Eliminate tool works on a selected features from a feature class. Make feature layer with an expression creates an output layer with only the features that honor the expression, whereas the Select Layer By Attribute tool creates a output layer with all the features in it but with features selected based on the query.
I have the same problem trying to build a model. When I run step by step in the model, it runs well. When I create parameter and run the model from ArcToolbox, it gave me the error: ERROR 000840 The value is not a Raster Layer. ERROR 000840: The value is not a Mosaic Layer. I have checked all the setting, and there is anything that indicates the Feature Class has to be Raster. Attached are the error message and parameter properties of my model. Please help! Thank you! Serena