Why is "Always run in foreground" grayed out?

741
3
Jump to solution
02-24-2013 04:20 PM
GraemeBrowning
Occasional Contributor III
I have a dozen or so large models (400+ elements) that I wrote several years ago using ArcGIS 9.3 and am now upgrading to ArcGIS 10.0 SP5 (10.1 is not installed here).  On the General tab of the Properties for just a few of them the "Always run in foreground" checkbox is checked on and grayed out.

I would like to run these models in the background but the "Always run in foreground" setting is overriding the Geoprocessing Option to Enable Background Processing so that even if I check the latter it has no effect.

Does anyone know what might be causing "Always run in foreground" to be grayed out and unavailable to toggle?
1 Solution

Accepted Solutions
DaleHoneycutt
Occasional Contributor III
In deciding whether to enable the Always run in foreground checkbox, we scan the model and examine the properties of each tool the model uses.  If one of those tools has Always run in foreground checked (the default state), then the parent model's checkbox is disabled; you can't run a model in the background if one of the tools it is using is set to run in the foreground. 

So, I'm thinking that your custom models are calling other custom models or tools that you've built and you first have to enable those to run in the background.

Be sure to look at this topic about background: Running custom (model or script) tools in the background.  It discusses the above behavior as well as the importance of setting all layer variables to be parameters.

View solution in original post

0 Kudos
3 Replies
DaleHoneycutt
Occasional Contributor III
In deciding whether to enable the Always run in foreground checkbox, we scan the model and examine the properties of each tool the model uses.  If one of those tools has Always run in foreground checked (the default state), then the parent model's checkbox is disabled; you can't run a model in the background if one of the tools it is using is set to run in the foreground. 

So, I'm thinking that your custom models are calling other custom models or tools that you've built and you first have to enable those to run in the background.

Be sure to look at this topic about background: Running custom (model or script) tools in the background.  It discusses the above behavior as well as the importance of setting all layer variables to be parameters.
0 Kudos
GraemeBrowning
Occasional Contributor III
You were absolutely correct Dale.

I checked all Python script tools used in the model and found that many had "Always run in foreground" checked on.  Unchecking these enabled my large model to run successfully in the background.

The help link you provided was very useful too.  Luckily the other issues mentioned are not present in my models.  I think it would be useful to add another sentence to that help page saying:

If you want to run a model in the background and find you are prevented from doing so because Always run in foreground is checked on and grayed out, then check any sub-models or Python scripts it uses and ensure that they do not have Always run in foreground checked on.
0 Kudos
DaleHoneycutt
Occasional Contributor III
Graeme:
Good suggestion.  I added a note to the doc.
0 Kudos