Select to view content in your preferred language

Model Builder tool with in-line variables won't "add to display"

876
4
04-15-2014 11:11 AM
CherylTrine
Frequent Contributor
Hi all,
I???m creating a tool using model builder but have run into a snag???I can???t get my results to add to the display when running as a tool. 

In model builder it works fine with ???Add to display??? checked, but when I run it as a tool I can???t get my results to add to the display. It seems, perusing the forums, that this is a not uncommon problem, but I haven???t found a solution that works.  

I have made a simplified model that illustrates the problem.

I have a line feature that I want to convert to a polygon and I want the resulting feature class to be named using in-line variable substitution (in my full model I use this variable for other things as well).  So in this example, the only tool used is ???Feature to Polygon??? and a model variable called ???Name???.  I pass the name of the original line feature class as a Parameter and ???Name??? is also a parameter.
In Geoprocessing options, ???Add results of geoprocessing operations to the display??? is checked.
For the results feature, ???Add to display??? is checked and ???Model Parameter??? is checked (although I would prefer it not to be a model parameter, this seems to be required of tools for "add to display")

The resulting file gets named properly but it doesn???t automatically add to the display.  If, instead, I don???t use the model variable ???Name??? and instead make the Output Feature Class a parameter, it will add to the display when finished.  Consequently, it appears that the in-line variable has something to do with the problem.

Any ideas?

Cheryl
0 Kudos
4 Replies
deleted-user-VeC5jUIlNXtq
Deactivated User
Hey there,

I'm kicking myself for not writing down how I managed to fix this issue for some models I created recently.

I definitely recall my final output not being added to the display, so instead I'm going to give you all the information about my model I see relevant and hopefully it sparks something.

My final output doesn't actually have "Add To Display" checked off. It's also not managed, and it is a parameter.

I had the same feeling with making it a parameter (I would have preferred not, but that's the only way it would work).

I'll have a look around because I recall this issue taking quite some time to resolve. Hopefully we can turn something up.
0 Kudos
AmyKlug
Frequent Contributor
Hmmm, did not notice that before. My guess is it is something on ESRI's side they would have to change. Try searching if anyone has posted it in Ideas, if not you could post it there.


http://ideas.arcgis.com/


EDIT: Just saw the last response, hopefully you can figure it out!
0 Kudos
deleted-user-VeC5jUIlNXtq
Deactivated User
Apologies for the delay...work got busy!

Here's the thread I created about the issue. Maybe reading through it will give you some insight and hopefully get some sort of answer.

http://forums.arcgis.com/threads/100100-Model-Builder-Final-Output-Not-Added-to-Display

Hope that helps, have a great weekend.
0 Kudos
ChristianWells
Esri Regular Contributor
This behavior is expected when using the "Add To Display" documented here:

If you run the tool by clicking OK, the model will run. The output of the model will not be added to the ArcMap table of contents, even though Add To Display was checked for the output variable. The reason is that when a model is run from its tool dialog box, the Add To Display setting is ignored. To add the output to the display, you must make the output variable a model parameter.


http://resources.arcgis.com/en/help/main/10.1/index.html#//002w0000007v000000


However, if you would like to see this functionality added to ModelBuilder, please promote this idea on the ArcGIS Ideas site.

http://shar.es/T4lf6
0 Kudos