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.