AnsweredAssumed Answered

scratchworkspace for geoprocessing task

Question asked by dmortenson on Jul 16, 2014
Latest reply on Oct 15, 2018 by NZGeoCAD


I am trying to create a geoprocessing task that will result in a pdf file.  The geoprocessing task kicks off a python script and does stuff, then generates this report as a pdf.

I'm having a little trouble knowing what to specifically do with the scratchworkspace.


Here is what I've tried:

attempt 1:

Put the scratchworkspace in the python scripts. Did this a couple of ways:


arcpy.env.scratchWorkspace = '%scratchworkspace%'

(result: doesn't seem to do anything)



myfile   = "C:\\arcgisserver\\directories\\arcgisoutput\\SpecialProcess\\myfile.pdf"

( works when I run the python script by itself. Works when I run the script from a tool. Does not work as a geoprocessing service)


Attempt 2 :

Put a parameter called output_location in the tool.


tried as a data type of  folder, tried as a workspace.

Direction = output

Default = %scratchworkspace%


When i run it, it says that the output_location already exists and won't run.


Attempt 3:

Don't do anything for the output_location

In the Environment Settings, under workspace, under Scratch Workspace - entered %scratchworkspace%



I know this is just picky and needs to be set just perfectly to work.  Can anyone spell it out for me please?


Thank you.