I didn't fully understand using relative paths in models yet. I have already asked a question on this topic (EDIT3 - summary: I always check "Store relative path names", but when I move the model, this often/ always uncheck and I don't know why), and now I'm trying a more concrete approach. In this help page sharing whole directories was suggested. Now I try to do this - I have created similar directory structure and set scratch workspace (in ArcToolbox - Environments, not per model).
Now I face a problem: what path should the intermediate data have? When I left it blank, the result was ERROR 000735 for tools using the intermediate data as input or output, regardless of whether the data were managed or not.
Another way suggested here was to use %scratchworkspace% variable substitute. Now the errors are not so uniform, but none of my models work. Most errors were caused by a typo in scratch workspace variable (thanks to @danb for finding this). Still, errors some other models (in functions converting shp to raster) last :
ERROR 999999: Error executing function. Can't save to disk (check for space, write permission, or name).
Again, being managed or not means no difference.
One of the models previously failing due to the miss-spelled variable now works when the scratch workspace is a folder but not when it is a geodatabase. The error message is as follows:
ERROR 000875: Output raster: d:\Fav\APA\Lidar\ArcheoLidar\Scratch.gdb\FilterRaster's workspace is an invalid output workspace. ERROR 000581: Invalid parameters. Failed to execute (Focal Statistics).
I'm almost sure that the scratch workspace can't be blocked by anything. There could be problems with folder/geodatabase scratch workspace, but I tried both options and the errors are the same.
So how to share my model in the "ZIP and share well-organized system folder" manner? There must be some solution/ workaround for these problems.