<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Scratchworkspace inline variable usage in Modelbuilder 10.2 in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/scratchworkspace-inline-variable-usage-in/m-p/836213#M1547</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don't mean to bump the thread but I can no longer edit the original post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The new ScratchGDB and ScratchFolder environments&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2012/10/19/the-new-scratchgdb-and-scratchfolder-environments/"&gt;http://blogs.esri.com/esri/arcgis/2012/10/19/the-new-scratchgdb-and-scratchfolder-environments/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Feb 2014 15:54:17 GMT</pubDate>
    <dc:creator>TysonSchoepflin</dc:creator>
    <dc:date>2014-02-05T15:54:17Z</dc:date>
    <item>
      <title>Scratchworkspace inline variable usage in Modelbuilder 10.2</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/scratchworkspace-inline-variable-usage-in/m-p/836212#M1546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was updating a modelbuilder + python script tool for our 10.1 server.&amp;nbsp; I am using 10.2 desktop.&amp;nbsp; The model is pushed out as a geoprocessing service.&amp;nbsp; What was interesting is that the inline variable %scratchworkspace% appeared to be ignored by the "Select" and "Project" tools within the model.&amp;nbsp; The model creates a sub folder to which shape files are processes and all the files in that sub folder are then zipped.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Select and Project tools were supposed to place the the files in the sub folder but would just dump things out to the scratch folder.&amp;nbsp; Here is the line from the select output feature class input field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;%scratchworkspace%\output\ptsTmp.shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the desktop the model would run fine.&amp;nbsp; On the server the shape file would be dumped to the scratch folder, not the output folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After a bit of testing it appears that tools that are shared as a geoprocessing service cannot use %scratchworkspace% in their path names.&amp;nbsp; However, you can create a folder variable and assign it %scratchworkspace%.&amp;nbsp; Make sure you name the variable something, I used "sws".&amp;nbsp; I then went through the model and changed the paths to use %sws% instead of %scratchworkspace%, like the following.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;%sws%\output\ptsTmp.shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This worked.&amp;nbsp; The geoprocessing service on the server placed files in the correct folders after making this change.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps I missed the documentation somewhere, please point it out if it is there.&amp;nbsp; It appears that the inline variable %scratchworkspace% does not work in all input fields of modelbuilder tools.&amp;nbsp; In this case it would be best to create a folder variable, assign it %scratchworkspace%, and then use that variable within the rest of the model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just placing this here if anyone else experiences the same problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2014 18:52:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/scratchworkspace-inline-variable-usage-in/m-p/836212#M1546</guid>
      <dc:creator>TysonSchoepflin</dc:creator>
      <dc:date>2014-01-31T18:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scratchworkspace inline variable usage in Modelbuilder 10.2</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/scratchworkspace-inline-variable-usage-in/m-p/836213#M1547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don't mean to bump the thread but I can no longer edit the original post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The new ScratchGDB and ScratchFolder environments&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2012/10/19/the-new-scratchgdb-and-scratchfolder-environments/"&gt;http://blogs.esri.com/esri/arcgis/2012/10/19/the-new-scratchgdb-and-scratchfolder-environments/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 15:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/scratchworkspace-inline-variable-usage-in/m-p/836213#M1547</guid>
      <dc:creator>TysonSchoepflin</dc:creator>
      <dc:date>2014-02-05T15:54:17Z</dc:date>
    </item>
  </channel>
</rss>

