I am using the Contour tool in ModelBuilder, and I would like the output to always be the scratch workspace of whatever project it's run in. I tried %scratchGDB%\ContourLines, and the model runs, but that just makes a new scratch.gdb, every project we work it will already have a MapName_Scratch.gdb set up and assigned in the environments of the project.
I'd rather it not be a user-defined tool parameter; if a user is setting the environments of their project, the tool should honor that instead of having to define it again in the tool interface.
Solved! Go to Solution.
Solution found under Workspace Environments here.
Hi @AmyDunn this should work. I am not sure why in your case it is creating a new gdb. Are you able to provide a screenshot of the contour tool, model and project environments?
I figured it out, %scratchGDB% and %scratchFolder% are meant to create scratch.gdb or a folder named scratch, respectively. %workspace% and %scratchWorkspace% are meant to use the current and scratch workspaces set in the current project.