[GIS] Make Feature Layer won’t display in Table of Contents

arcgis-10.1arcgis-desktopbasic-license-levelmodelbuilder

I have a point layer "SurfaceLocation". It has a data field called "AgeRank". One of the values it can be is "M".

In Modelbuilder, I want to take that layer, select only the points that have a value of "M", and create a new layer in the Table of Contents. I'm using the "Make Feature Layer" tool. I use "SurfaceLocation" as the input, apply the correct expression, name the Output layer "Minors" and set the output to "Add to Display".

I run this and nothing happens. No new layer appears in the Table of Contents. When I try running it again, I get an error saying the Output Layer "Minors" already exists. It's not in the Table of Contents, so where is it?

I've tried closing and relaunching ArcMap. I've tried rebuilding this in a new model (and it still says it already exists). "Add results of geoprocessing operations to the display" is checked in geoprocessing options.

I've reviewed ModelBuilder not adding output feature class to Table of Contents? and decided to post this question because that didn't have an answer that worked for me. I was hoping for answers that I could use.

I've tried making the output layer a parameter. When I run the model, it doesn't even show up at the beginning for a value (the start parameter does). Unfortunately, I don't know a thing about python yet. I was hoping there was a tool that I couldn't find that would do this.

Further explanation:
Not sure why this simple problem can't have a simple solution.

The model is an oval (layer input) a rectangle (Make Feature Layer) and another oval (layer output). I want the input to be an existing layer without any definition query. I want the tool to apply the definition query and output another layer into the TOC. I do not want to create another feature class. The model doesn't have to look like this. If I need to string a couple of tools together to do it, that's fine.

* If I was doing this manually, I'd right click on the first layer, select copy, paste it, rename it, and add a definition query. Then I would "Apply symbology from layer". *

I can't find a tool that does this. "Make Feature Layer" doesn't put it in the TOC. It puts it in_memory. That would be fine if I could then find a tool that takes it out of memory and adds it to the TOC. Being in_memory doesn't help me. I want to display it, not do any processing to it.

Best Answer

If you post your workflow, it will be clear where your error is. I just tested the workflow you described, and I get the layer in my TOC.

Here is my model. I have ticked 'Add to Display' on the output layer: enter image description here

enter image description here

Here are my 'Make Feature Layer' settings:

Your query will need to be AgeRank = 'M'

enter image description here

When I run the model, the layer shows up in the TOC and shows the correct subset based on my query:

enter image description here

Please try this workflow and let us know if you still get errors.

Related Question