ArcGIS Pro 2.5: The “create fishnet” tool doesn’t respect the “scratch workspace” set for the model,

1224
8
06-24-2020 01:46 AM
JamalNUMAN
Legendary Contributor

ArcGIS Pro 2.5: The “create fishnet” tool doesn’t respect the “scratch workspace” set for the model,

 

I observed that the “create fishnet” tool doesn’t respect the “scratch workspace” set for the model.

 

Is this by design?

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
8 Replies
Robert_LeClair
Esri Notable Contributor

Jamal - there are hierarchical environment settings in ArcGIS Pro (as well as ArcMap).

From top level to bottom level:

  1. Application Tier
  2. Geoprocessing Tier
  3. ModelBuilder Tier
  4. Modelbuilder Process Tier

Per the Help Doc - "The one exception to this hierarchy is with models. If you run the model from the ModelBuilder window, the application environment is passed down. If you run the model using its tool dialog box, the tool environment is passed down."

Now, if you click ENVIRONMENTS on any GP tool UI in your Model, you will see supported environment settings for each GP tool.  You can set new environment settings at the GP tier to override application tier and in the case of MB, set environment settings at the Modelbuilder Process Tier to override the ModelBuilder Tier, the GP Tier, and the Application Tier.  In the Create Fishnet help doc -> Environments, you'll see Scratch Workspace is not listed as an environment setting so the tool does not inherit that setting at the application tier.  This results in what you're seeing in your screen grab.

JamalNUMAN
Legendary Contributor

Thank you for the input Robert.

 

I’m aware of all what you have already mention. My point here is different.

 

To replicate the issue, please, consider the following:

 

- Create new model

- Set the environment for the model (scratch workspace)

- Add the “create fishnet” tool and fill its parameters (this command doesn’t require prior input layer)

 

Now you will be finding out that the output location is not automatically specified and the command will never run unless you specify manually the output location

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
Robert_LeClair
Esri Notable Contributor

I understand the question and thank you for the new screen grabs.  As I described in my previous reply the "Scratch Workspace" is not a supported Environment Setting for the Create Fishnet GP tool whether it's run at the GP Tier or Model Process Tier - hence you see what you see.  You may reference the supported Environment Settings for the Create Fishnet GP tool here.  The bigger question is WHY it's not a supported Environment Setting?  For that, I'd recommend reaching out to Esri Support Services and see if you can work with Data Management Team Analyst to see if they have a better answer.

One test I could see is export your Model out to a Python script tool and after the import arcpy command put in the following text:

# Set Geoprocessing environments

arcpy.env.scratchWorkspace = "c:\\data\\tests\\scratch.gdb"

arcpy.env.workspace = "c:\\data\\tests\\test_grids.gdb"

Then the remainder of the Python script and make a Python Script Tool in your project toolbox.

Does the Python script tool now honor the scratch workspace?  Please advise.

JamalNUMAN
Legendary Contributor

Thanks Robert

 

“create tin” tool has the same issue. It doesn’t respect the “scratch workspace” environment settings. But here this might refer to the fact that the TIN can’t be saved into a geodatabase file.

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
Robert_LeClair
Esri Notable Contributor

Correct - TIN's can only be saved outside of a geodatabase.  They seem to use the "ArcInfo coverage" storage format with an INFO directory and teh TIN itself.

DanPatterson
MVP Esteemed Contributor

Bug fixes.... Pro 2.6 ....

BUG-000126223

The Create Fishnet tool does not work as expected when a variable is defined as a workspace.


... sort of retired...
JamalNUMAN
Legendary Contributor

In 2.6, the “create fishnet” tool doesn’t respect the “scratch workspace” set for the model

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
DanPatterson
MVP Esteemed Contributor

Validate a model—ArcGIS Pro | Documentation 

could be

You will also need to validate your model if all processes in the model have been run and you wish to run them again.


... sort of retired...