Is it possible to set the "Always run in foreground" option within ArcPy code? I haven't found anything on this yet?
It would be nice to be able to specify within a script, instead of through the Geoprocessing Options window.
Answer
This can be done in ArcPy when you are Defining a tool in a Python toolbox by using the canRunInBackground
property:
If canRunInBackground is unset or set to True, the tool will respect the current Background Processing setting in the Geoprocessing Options dialog.
If set to False, the tool will always run in the foreground, overriding the Background Processing setting in the Geoprocessing Options dialog.
No comments:
Post a Comment