Layer removed from Table of Contents During Geoprocessing

659
2
Jump to solution
04-24-2013 11:53 AM
JakeGalyon
New Contributor III
We are trying to buffer from a point file in modelbuilder.  We have attached the model to a button on a custom toolbar.  When running the model using the custom toolbar.  The layer is removed from the TOC, and also should be added to display-because it's checked on.  But, when i right click the model, go to edit, and then run within the mxd the layer is not removed, and the most current buffer is added to display.  Any suggestions would be appreciated.  Thanks.

jake
0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor
When running the model using the custom toolbar, the layer is removed from the TOC, and also should be added to display-because it's checked on.  But, when i right click the model, go to edit, and then run within the mxd the layer is not removed, and the most current buffer is added to display.


Jake - you need to set it up as an output parameter.

From the help:

Note: 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


Desktop 10.1 Help: Displaying model data

View solution in original post

0 Kudos
2 Replies
curtvprice
MVP Esteemed Contributor
When running the model using the custom toolbar, the layer is removed from the TOC, and also should be added to display-because it's checked on.  But, when i right click the model, go to edit, and then run within the mxd the layer is not removed, and the most current buffer is added to display.


Jake - you need to set it up as an output parameter.

From the help:

Note: 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


Desktop 10.1 Help: Displaying model data
0 Kudos
JakeGalyon
New Contributor III
Thank you that worked.
0 Kudos