Hi Esri
We have had an issue setting the scratch disk in ArcPro. Just to be clear, we are setting the parameter using arcpy in a python toolbox not manually in environment settings. Our situation it this:
The problem is the location of the scratch disk space. This means that outputs to the scratch disk are going across the network, which significantly increases processing time. Having the scratch disc set (independently of the default geodatabase) allows us to put it on the users C drive and speed up processes. Note, even then some of our processing tasks can take 5-6 hours.
Having communicated with Esri support, they have confirmed that this is not currently possible for an aprx in arcpy. Here is the relevant response from your team:
“The screenshot below shows all the places in which geoprocessing environment settings can be defined within ArcGIS Pro.
Whilst it is possible to define the application settings (top level) using ArcPy via the user interface, it isn’t possible to programmatically do this with ArcPy. Unfortunately, this workflow is not currently supported, however it is a valid enhancement, therefore we would recommend that you log it as an idea on the Esri Community page.”
My suggested enhancement, like doing things manually, in arcpy allow us to set the scratch disc and default geodatabase independently of each other. This would allow me in our python processing tools to find the username and set the scratch disc to their C drive user area, leaving the default outputs pointing at the project temporary geodatabase. Currently, when doing larger tasks we are in danger of increasing processing time significantly when it is avoidable, or having default outputs going to a users C drives which is not acceptable. We would much rather be able to code this process, rather than relying of users to set their env settings manually, to create a slicker processes.
Any queries, get in touch.
Regards
Andy
Hi Luke
You're right we can and do do this, which makes me realise I mislead a little in my text. We also need this to work for the out of the box geoprocessing tools. What I want to be able to do is every time a new aprx is created, check the default geodb goes to the server and the scratch disc goes to the C drive. Every time the aprx is saved (using our own save tools which also updates the drawing index metadata) the scratch disc location is checked as the current user and moved if needs be.
There are ways and means, but the above would be a lot slicker.
Regards
Andy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.