+ Reply to Thread
Results 1 to 8 of 8

Thread: Select by Attributes in Model Builder

  1. #1
    Kathrin Schulte-Braucks
    Join Date
    Oct 2010
    Posts
    73
    Points
    3
    Answers Provided
    0


    0

    Default Select by Attributes in Model Builder

    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).

    Thank you very much for any suggestions!

    Katze01

  2. #2
    Shitij Mehta

    Join Date
    Apr 2010
    Posts
    215
    Points
    42
    Answers Provided
    5


    0

    Default Re: Select by Attributes in Model Builder

    Check attached image:
    Is this what you are doing?
    Pls provide some more details.
    You are working with 10 service pack 2?
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	forum.png‎
Views:	980
Size:	40.4 KB
ID:	8660  

  3. #3
    Kathrin Schulte-Braucks
    Join Date
    Oct 2010
    Posts
    73
    Points
    3
    Answers Provided
    0


    0

    Default Re: Select by Attributes in Model Builder

    Quote Originally Posted by Katze01 View Post
    "Select by Location" is working successful,
    Oh, of course I meant "Select by Attributes".

    Thanks for your detailled answer!

    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?
    Last edited by Katze01; 08-31-2011 at 02:15 PM.

  4. #4
    Shitij Mehta

    Join Date
    Apr 2010
    Posts
    215
    Points
    42
    Answers Provided
    5


    0

    Default Re: Select by Attributes in Model Builder

    Select LAYER by Attribute = Feature Layer as input

  5. #5
    Kathrin Schulte-Braucks
    Join Date
    Oct 2010
    Posts
    73
    Points
    3
    Answers Provided
    0


    0

    Default Re: Select by Attributes in Model Builder

    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).

  6. #6
    Kathrin Schulte-Braucks
    Join Date
    Oct 2010
    Posts
    73
    Points
    3
    Answers Provided
    0


    0

    Default Re: Select by Attributes in Model Builder

    Keep on getting an error message (Input must be a featue class) at the point that the Make Feature Layer Output is connected to "Eliminate" (see attachment).

    The helpfile says, that Eliminate needs a Feature Layer with a selection as input. I put the sql expression in the Make Feature Layer tool
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	model_prob.png‎
Views:	457
Size:	60.2 KB
ID:	8798  
    Last edited by Katze01; 09-07-2011 at 12:14 AM.

  7. #7
    Shitij Mehta

    Join Date
    Apr 2010
    Posts
    215
    Points
    42
    Answers Provided
    5


    0

    Default Re: Select by Attributes in Model Builder

    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.

  8. #8
    Serena Cain
    Join Date
    Jul 2010
    Posts
    2
    Points
    0
    Answers Provided
    0


    0

    Default Re: Select by Attributes in Model Builder

    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
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	Capture1.PNG‎
Views:	71
Size:	11.1 KB
ID:	26162   Click image for larger version

Name:	Capture.PNG‎
Views:	56
Size:	16.2 KB
ID:	26163  

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts