How to set output folder path in ModelBuilder

10134
5
Jump to solution
02-16-2018 12:09 PM
by Anonymous User
Not applicable

How to set output folder path in ModelBuilder?  The tool shown in the below iterates rasters to clip the data.  I would like to make the output raster folder path to be the user input.  I tried a few things, but unfortunately, it didn't work.  I searched solutions online, but it also didn't go well.  I would very much appreciate your help.

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

a folder is a 'Workspace'  try that as the parameter... and there is a 'Folder' parameter ... at least for script tool parameters.

View solution in original post

5 Replies
ChrisDonohue__GISP
MVP Alum

I can't answer for ArcGIS Pro's flavor of Modelbuilder, but in ArcGIS Desktop's Modelbuilder one would set the output as a "Model Parameter".  This way, if the Model is run as a Tool, it will prompt the user for an output location.  Note, however, that the prompt will not come up if the model is run in Edit mode.

Chris Donohue, GISP

by Anonymous User
Not applicable

Thank you for your reply.  It will prompt the user to input full path file name for the output.  Since I am using Iterator, file name changes (I am using "Inline variable substitution" for the file name) so I need to find another way to set "Folder path" not "File Path". 

0 Kudos
ChrisDonohue__GISP
MVP Alum

One potential possibility would be to employ this:

Parse Path—Tools | ArcGIS Desktop 

Also, there may be some potential to use these:

Creating stand-alone variables—Help | ArcGIS for Desktop 

That said, I have not played with either a whole lot, so you would have to do some testing.

Chris Donohue, GISP

0 Kudos
DanPatterson_Retired
MVP Emeritus

a folder is a 'Workspace'  try that as the parameter... and there is a 'Folder' parameter ... at least for script tool parameters.

by Anonymous User
Not applicable

Thank you so much!!  'Workspace' worked perfectly!!  I added 'Workspace' variable and connected as 'Current workspace' and then added 'Inline variable substitution' to output raster dataset path (e.g. %Workspace%\%output_value%.tif).

0 Kudos