I am trying to create a model builder and it creates various raster's while it runs. I want to have the option to pick what folder I want to save every thing in. Having the set up something like this.
In the model builder I want the workspace to be connected to every raster output. It gives me the option to make this the "current workspace" when I try to connect it but the arrow does not stick with it. I have the arrows set to precondition.
Is there anyway I can get around this? I want to be able to use this model builder on multiple map documents but with different folders where the layers will go.
A couple of ideas to play with:
One possibility is to use an In-line Variable Substitution: (See Example #1 in the link)
Examples of inline model variable substitution—Help | ArcGIS for Desktop
Another possibility is to use the Modelbuilder Environments:
Also, if the issue is that you want the tool user to be able to browse to a different workspace each time the tool is run instead of it being set to the same workspace all the time (ie instead of "hard-coded"), you can set up Modelbuilder so the Parameter is Exposed. If this is done, the tool will require the user to supply the location of the workspace each time it is run.
Exposing tool parameters as variables—Help | ArcGIS for Desktop
Chris Donohue, GISP
So the In-Line Variable Substitution works great! but after the Model Builder is executed it delete the previous raster and only gives me the raster it created. How can I prevent it from deleting the previous rasters from the folder when it completes the raster builder?
Solutions to this depend on which rasters are being deleted - the final outputs or the intermediate files:
A quick tour of managing intermediate data—Help | ArcGIS for Desktop
Examples of inline model variable substitution—Help | ArcGIS for Desktop
Chris Donohue, GISP