Push all the outputs to the same Input Folder in ArcGIS Pro

1651
5
Jump to solution
06-26-2017 12:19 AM
JanakiGattu1
New Contributor III

Dear ArcGIS Pro Model Builder Team,

I am working on the ArcGIS Pro Model Builder....My model is having many tools and each tool generates different outputs...I would like to save all the Outputs to a location from where the input is fetched....

Could anyone help me on how to do this.

0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor

Please define "not working".  If your tools are not in a chain, be sure to make sure you set up preconditions to make sure Parse Path runs before each of your tools run, this will make sure the variable gets populated. The example below uses Calculate Value but any other tool that needs to use the Input workspace  variable to define its output would work with preconditions the same way. Sometimes the order of running tools (based on which tool was added to the model first) happens okay automatically, but preconditions force the order in which things happen.

Precondition with parse path in Model Builder

View solution in original post

5 Replies
DanPatterson_Retired
MVP Emeritus

Have you checked the options on setting your workspace environments in modelbuilder?

0 Kudos
JanakiGattu1
New Contributor III

Hi Patterson,

We tried giving the Scratch and the Current Workspaces by doing the Workspace settings as %Current Workspace%...But we are not able to set the Environments....Hence requesting you to send an example of how to fix this....

 

My Problem is -  I have a custom Model with various tools in the Model...As there are lots of tools, There will be lots of outputs generated, I wanted them to be stored in the location automatically from where I have taken the input...

0 Kudos
curtvprice
MVP Esteemed Contributor

The variable for current workspace is %workspace%, not %current workspace%.

You said you wanted the output location the same as input, one thing you could try is to use the Parse Path model-only tool (access by right click in Model Builder) on one of your inputs to extract its workspace, say, to a model variable you can name Input workspace.  Then you can set your output locations using that variable like this:

%Input workspace%\output_polygons

To make sure that the output location is set before your tool that create output runs, make sure that you set your Parse Path output as a precondition to the first tool in each processing chain that writes data to your output.

Hope this helps.

0 Kudos
JanakiGattu1
New Contributor III

Hello Curtis Price,

We tried working with "Parse Path" earlier....The models in ArcGIS Desktop Model Builder are working Perfectly when using "Parse Path Tool".........But the same when used in ArcGIS Pro - It is working Perfectly, When I have only one tool to be executed in the Model Builder....But If I have multiple Tools to be executed in the Model Builder in ArcGIS Pro that generates multiple outputs, then "Parse Path Tool".is not working...

Can you share me an Working Example of Model Builder in ArcGIS Pro using "Parse Path Tool".

0 Kudos
curtvprice
MVP Esteemed Contributor

Please define "not working".  If your tools are not in a chain, be sure to make sure you set up preconditions to make sure Parse Path runs before each of your tools run, this will make sure the variable gets populated. The example below uses Calculate Value but any other tool that needs to use the Input workspace  variable to define its output would work with preconditions the same way. Sometimes the order of running tools (based on which tool was added to the model first) happens okay automatically, but preconditions force the order in which things happen.

Precondition with parse path in Model Builder