<?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 Changing workspace in modelbuilder in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/changing-workspace-in-modelbuilder/m-p/566359#M18697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I saw something on ESRI's website about changing paths in modelbuilder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Say for instance, I have flow accumulation function in my model.&amp;nbsp; The input DEM path is &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\temp\myGRID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use something like &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;%workspace%\myGRID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How and where would I set the workspace variable in modelbuilder?&amp;nbsp; I do not want to use a scratch workspace.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this the same as the current workspace variable at &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Intermediate_data_and_the_scratch_workspace"&gt;http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Intermediate_data_and_the_scratch_workspace&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If so, where do I set it?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, is there a way to iterate through a list of workspaces?&amp;nbsp; Again, if so, how?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jun 2010 16:58:45 GMT</pubDate>
    <dc:creator>ChristopherJursa</dc:creator>
    <dc:date>2010-06-01T16:58:45Z</dc:date>
    <item>
      <title>Changing workspace in modelbuilder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/changing-workspace-in-modelbuilder/m-p/566359#M18697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I saw something on ESRI's website about changing paths in modelbuilder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Say for instance, I have flow accumulation function in my model.&amp;nbsp; The input DEM path is &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C:\temp\myGRID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to use something like &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;%workspace%\myGRID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How and where would I set the workspace variable in modelbuilder?&amp;nbsp; I do not want to use a scratch workspace.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this the same as the current workspace variable at &lt;/SPAN&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Intermediate_data_and_the_scratch_workspace"&gt;http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Intermediate_data_and_the_scratch_workspace&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If so, where do I set it?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, is there a way to iterate through a list of workspaces?&amp;nbsp; Again, if so, how?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jun 2010 16:58:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/changing-workspace-in-modelbuilder/m-p/566359#M18697</guid>
      <dc:creator>ChristopherJursa</dc:creator>
      <dc:date>2010-06-01T16:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Changing workspace in modelbuilder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/changing-workspace-in-modelbuilder/m-p/566360#M18698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Edit your model. &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Go to Model--&amp;gt;Model Properties--&amp;gt;Environments tab--&amp;gt;General and set the curreent workspace environment and the scratch workspace environment there. &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Hit OK&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;Now use current workspace as %workspace% and scratch workspace as %scratchworkspace% in your input and output path respectively. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;0r&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;Right click anywhere in your model and from the side menu click Create Variable. Create a variable of type workspace. You can rename the variable to anything say: Input Workspace. &lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Provide the variable a workspace value and use it in other tools as %Input Workspace%.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;**Its always recommended that you set the environments at the ArcMap/application level if all your models are using the same workspace.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;----------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Iterate though a list of workspaces or the feature classes and tables inside the workspaces?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you want to do by iterating over workspaces?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jun 2010 21:36:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/changing-workspace-in-modelbuilder/m-p/566360#M18698</guid>
      <dc:creator>ShitijMehta</dc:creator>
      <dc:date>2010-06-04T21:36:02Z</dc:date>
    </item>
  </channel>
</rss>

