Select to view content in your preferred language

localgeoprocessingservice route directions

1747
1
Jump to solution
10-25-2012 07:31 PM
Labels (1)
VincentDolan
Occasional Contributor
I can get text directions written to Route_Directions.xml - in any folder I want - when I run my Model in ArcMap.  But, after Sharing to a .gpk, and submitting job via LocalGeoprocessingService, I can only seem to get the file to be written to the scratch folder in %temp%.

Can I do something different to get the xml file to be written to a different folder outside of %temp%?  Or is there a better way to get route directions when using a LocalGeoprocessingService?

Thanks.
0 Kudos
1 Solution

Accepted Solutions
KevinHibma
Esri Regular Contributor
When you package up a GP model into a GPK for Runtime, output paths for data are changed.
In the case of a folder they'll be changed to %scratchFolder%\filename.txt
This ensures that when running this GPK, the file can be generated in the appropriate place without fear of overwriting an existing one.
The Runtime works in a similar manner to Server.
With Server, each GP Service will usually execute to C:\arcgisserver\directories\arcgisjobs\<service>_gpserver\guid
With Runtime, it uses the TEMP directory as you point out.

My suggestion - let it write the file there as its doing. This is safe and will always work. If you want to persist the file somewhere else use some code to either copy the file to another location or give the user and option to save the file to a directory of their choice.

View solution in original post

0 Kudos
1 Reply
KevinHibma
Esri Regular Contributor
When you package up a GP model into a GPK for Runtime, output paths for data are changed.
In the case of a folder they'll be changed to %scratchFolder%\filename.txt
This ensures that when running this GPK, the file can be generated in the appropriate place without fear of overwriting an existing one.
The Runtime works in a similar manner to Server.
With Server, each GP Service will usually execute to C:\arcgisserver\directories\arcgisjobs\<service>_gpserver\guid
With Runtime, it uses the TEMP directory as you point out.

My suggestion - let it write the file there as its doing. This is safe and will always work. If you want to persist the file somewhere else use some code to either copy the file to another location or give the user and option to save the file to a directory of their choice.
0 Kudos