Add results of geoprocessing operations to the display

3603
9
06-08-2017 06:29 PM
SimonJackson
Occasional Contributor III

Running 1.4

Have a model that I am running from the dialog box.  The final output in the model has 'Add to display' enabled and is not a managed layer.  However, I am aware this setting only works when running the model from within Modelbuilder.

According to the ArcMap help:

Add To Display has no effect outside ModelBuilder. When running a model tool from its dialog box or the Python window, the Add To Display setting will not be honored. To add model data variables to the display when running the model from its dialog box or the Python window, make the data variable a model parameter, then enable the Add results of geoprocessing operations to the display option from the Standard toolbar: Geoprocessing > Geoprocessing Options > Add results of geoprocessing operations to the display.

Where is this setting in ArcGIS Pro?

9 Replies
DanPatterson_Retired
MVP Esteemed Contributor

Can't find one... It has been my experience in PRO, that stuff is added regardless of the method of generation and if you don't want it, it gets removed.  Perhaps this is by design... heading off all those GeoNet questions about why people can't find/see the results of their model/tool when it ran successfully and the standard answer is .... have you toggled on ...blah blah blah.

Just my guess in the absence of this being the first question that I have found on this subject.

0 Kudos
curtvprice
MVP Esteemed Contributor

As the help says, you need to tag the model output element as a parameter. (This is done inside the model builder editor.)

I agree with Dan -- I believe that in Pro, there is no way to turn this off, tool outputs are always added to the map.

SimonJackson
Occasional Contributor III

I should point out that the output is set as a parameter and can confirm that the layer is still not added to my Contens after running the tool from the dialog.

DanPatterson_Retired
MVP Esteemed Contributor

But you can add it manually? There may be a difference in the tool versus modelbuilder interface that needs investigation

0 Kudos
KyleNorton
New Contributor

I am having the same problem.  Summarize within tool works manually but it does not display when used within model builder, and yes the parameter is turned on and the display is turned on inside of the model builder.

0 Kudos
ShitijMehta
Esri Regular Contributor

Hello All,

I understand there is a bit of confusion and a bit of bug mixed together here on this thread.

A model can be run:

   1. by editing a model and running within a model view (Any output you need to be added to display needs to have the right click>Add to Display checked)

  2. you can run a model by double clicking a model and running it from the model tool dialog in geoprocessing pane.   Only the outputs that are model parameters are added to map. (add to display option set on parameter through edit mode does not work here)

    - if your output is intermediate/output of an in-between tool (and not terminal) and is not a model parameter the output will be deleted currently after the model runs from the tool dialog in gp pane.

   - all outputs are added to display now hence the backend option to check "add the results of geo....to display" has been removed.

   - if you are running from within a model and add to display is not being honored - that is because of add to display related bug which is not working in few cases such as for network layers, stand alone table. We will fix these bugs in the next release.

- @Simon Jackson - What is the data type of the output that you are creating and is not adding to map inspite of being a model parameter? Please advise!

   - if this does not resolve please do share your model and a sample of your data (if possible) or a snapshot of your model. We will try our best to answer. If it is a bug you are reporting we will log the bug and work to get it fixed.

Thanks!

BeauJohnson
New Contributor

This issue is still outstanding. My model only properly works when I run it from the model Builder editing Window and not in its tool geoprocessing window.

The steps I am trying to accomplish are as follows:

1. exporting Autocad Polygons to a Feature Class

2. Adding XY coordinates to the new feature class

3. sorting the feature class based on the XY coords

4. Adding a new ID field based upon the new sorted order

5. Adding the feature to display

6. executing a label expression and adding the label to the map for the new feature class (this is a custom script)

7. Converting the labels to annotation

8. Exporting the labels back to CAD

The tool works perfectly when I open the model builder editor but doesn't when running it through the geoprocessing window. It needs to add the feature class to my map prior to the custom labeling expression (Which it doesn't because of the predetermined issue in this thread)

is there any chance of this being resolved anytime soon?

0 Kudos
ShitijMehta
Esri Regular Contributor

Beau Johnson

Please can you share the snapshot of the model and the tool dialog of the tool where the add to display dos not work from the GP tool dialog?

Probably it is intermediate and is getting deleted from the gp tool dialog. Make that output a parameter and it will work.

ElizabethWheeler
New Contributor III

We are facing this issue now. All final products are set as parameters and to add to display. This includes two tables and one layer, a buffer. Nothing is added to the project.

0 Kudos