<?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: Inline model variable substitution in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142064#M4832</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would suggest converting your model to a python script (export the model and clean up the code). Then you can loop through lists or dictionaries to your heart's content.&lt;/SPAN&gt;&lt;IMG src="http://www.infoocean.info/avatar2.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Mar 2012 00:27:54 GMT</pubDate>
    <dc:creator>EdithFergus</dc:creator>
    <dc:date>2012-03-29T00:27:54Z</dc:date>
    <item>
      <title>Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142062#M4830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible to use the inline model variable substitution when the input is a list of variables?&amp;nbsp; I would like to be able to select a number of input soil shapefiles, clip each according to the same clip features, then name each resulting clipped soil shapefile according to its original input name.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've made a general input feature (to be clipped) called 'Soil', set it to parameter and a list of values.&amp;nbsp; I've parsed the name of 'Soil' and set the output variable from here as 'SoilName'.&amp;nbsp; Finally, I use inline variable substitution for my clipped output feature by calling it 'Clipped_%SoilName%'.&amp;nbsp; When I run the model, I input 2 features to be clipped: the soils shapefiles of Herkimer County and Montgomery County (in that order).&amp;nbsp; When it's finished running, I only get the clipped Montgomery County with the name 'Clipped_Herkimer'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know that there are other methods of inline variable subing, such as the %i% option, but in this case the name is essential because I will be using this later in the model to perform a table join with each County's massive soils table.&amp;nbsp; Any thoughts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 15:33:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142062#M4830</guid>
      <dc:creator>BillTrask</dc:creator>
      <dc:date>2012-03-28T15:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142063#M4831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would suggest converting your model to a python script (export the model and clean up the code). Then you can loop through lists or dictionaries to your heart's content.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I find Model builder works best for fast prototyping; when the process works once through in the model I then export it and build in the looping and error checking and whatnot.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 17:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142063#M4831</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2012-03-28T17:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142064#M4832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would suggest converting your model to a python script (export the model and clean up the code). Then you can loop through lists or dictionaries to your heart's content.&lt;/SPAN&gt;&lt;IMG src="http://www.infoocean.info/avatar2.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 00:27:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142064#M4832</guid>
      <dc:creator>EdithFergus</dc:creator>
      <dc:date>2012-03-29T00:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142065#M4833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Right, but there should be a way to do it in the model builder.&amp;nbsp; Otherwise the option of using inline variable substitution is quite limited.&amp;nbsp; Any other suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 17:54:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142065#M4833</guid>
      <dc:creator>BillTrask</dc:creator>
      <dc:date>2012-03-29T17:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142066#M4834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is it possible to use the inline model variable substitution when the input is a list of variables?&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;I know that there are other methods of inline variable subing, such as the %i% option, but in this case the name is essential because I will be using this later in the model to perform a table join with each County's massive soils table.&amp;nbsp; Any thoughts?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you use the Iterate Multivalue tool (or any other iterator), the iterator generates variables on each loop, just for this purpose. If what you are getting isn't exactly what you need, you can use the Calculate Value tool on each loop to manipulate these values to create the output pathname you want. use the output of the Calculate Value tool in percents embedded in your output file name, for example "Soil_%shapename%.dbf". Be sure and use preconditions to make sure the variable gets calculated by Calculate Value before you run the tool that uses its name for an output.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 19:04:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142066#M4834</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-03-29T19:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142067#M4835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, that worked.&amp;nbsp; The only pitfall is that I had to manually enter in the output address: 'G:\Test\%Value%Clip.shp' for each of the output variables, which is both odd and self-defeating.&amp;nbsp; You would think that the inline substitution would be able to handle this.&amp;nbsp; If I don't copy and paste this same address onto the next line of the 'batch' table, I merely get the last clipped shapefile with the first shapefile's name.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 15:20:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142067#M4835</guid>
      <dc:creator>BillTrask</dc:creator>
      <dc:date>2012-03-30T15:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142068#M4836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN style="font-style:italic;"&gt;The only pitfall is that I had to manually enter in the output address: 'G:\Test\%Value%Clip.shp' for each of the output variables.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried: %Workspace%\%Value%Clip.shp....and just befor that set your workspace to: G:\Test&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Mar 2012 12:14:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142068#M4836</guid>
      <dc:creator>HenrikSvenningsen</dc:creator>
      <dc:date>2012-03-31T12:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142069#M4837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;SPAN style="font-style:italic;"&gt;The only pitfall is that I had to manually enter in the output address: 'G:\Test\%Value%Clip.shp' for each of the output variables.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Have you tried: %Workspace%\%Value%Clip.shp....and just befor that set your workspace to: G:\Test&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I tried that with the same result.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2012 14:03:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142069#M4837</guid>
      <dc:creator>BillTrask</dc:creator>
      <dc:date>2012-04-10T14:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142070#M4838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear wjtrask, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Couple of things to check and try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt; Share your model or a snap shot of your model.&lt;/LI&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;LI&gt;How are you running the model?&lt;/LI&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; By editing a model and running from within ModelBuilder?&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From its tool dialog?&lt;BR /&gt;&lt;BR /&gt;&lt;LI&gt; If you are running from tool dialog - Make sure that your outputs are not intermediate (especially the one on which your inline variable substitution depends)&amp;nbsp; Right click your green ovals and uncheck the intermediate such that they are not deleted after the model runs. Experiment with this. You can always check it intermediate if you do not need them after you run the model and also after you make sure that downstream tools are not dependent on any of the outputs marked as intermediate&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;BR /&gt;&lt;SPAN&gt;Try these at 10.0:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do not use a list variable INSTEAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Put all your shapefiles in one place and use the Iterate Feature Class Iterator. This iterator has two outputs 1) the feature class path which you can connect to the Clip tool downstream, 2) Name- which is the name of the feature class. Use this variable name in your output as %Name%.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are using Multivalue Iterator use the Parse Path tool and set the second parameter of that tool to Name. Use the output of Parse path as inline in your downstream tools. Set precondition from Parse path to the next tool&amp;nbsp; Clip.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2012 21:27:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142070#M4838</guid>
      <dc:creator>ShitijMehta</dc:creator>
      <dc:date>2012-04-16T21:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142071#M4839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;shitijmehta:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks so much for sharing! I used the parse path tool for inline variable input/output while using the iterate multivalue tool and it worked brilliantly!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Crystal&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2012 18:51:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142071#M4839</guid>
      <dc:creator>CrystalCarreon</dc:creator>
      <dc:date>2012-08-16T18:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142072#M4840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello All, I know this is an old thread but I am facing a similar issue.&amp;nbsp; I am using ArcGIS 10.1 and am trying to export clipped datasets to a new file geodatabase.&amp;nbsp; I tried using both the iterator method, the list of values, and the batch parse path method.&amp;nbsp; I want to keep the same file name but change the output location.&amp;nbsp; When I specify the new output location I use %Name% so that the original names will transfer over to the new output file geodatabase.&amp;nbsp; When I do so I get the following error for both methods:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Start Time: Thu Feb 14 21:16:23 2013&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000210: Cannot create output C:\Users\Desktop\SanDiegoData\Output.gdb\%Name%&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000354: The name contains invalid characters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000354: The name contains invalid characters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000354: The name contains invalid characters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The table was not found. [%Name%]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (Clip)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try the same process without changing the geodatabase output location and name (the output automatically add the&amp;nbsp; _clip) it works fine.&amp;nbsp; Any suggestions?&amp;nbsp; Am I using the wrong Wildcard/In-line Variable?&amp;nbsp; As mentioned by someone else.&amp;nbsp; It is essential that I keep the names the same and I would prefer to use the list of values method so that I can bring files in from different locations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you in advance for any help you can offer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 03:28:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142072#M4840</guid>
      <dc:creator>PapantzinCid</dc:creator>
      <dc:date>2013-02-15T03:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142073#M4841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt;The table was not found. [%Name%]&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I highly recommend you focus on using the iterator method; multi-values are a bear to work with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't see where you are populating a Name variable. If the variable does not exist, it gets put into your tool arguments unmodified.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The normal way to get that value is to use the Parse Path tool as described above in this thread.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 14:44:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142073#M4841</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-02-19T14:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inline model variable substitution</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142074#M4842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you.&amp;nbsp; After speaking to several other people they also suggested using the parse tool.&amp;nbsp; Thanks so much for the reply!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 03:41:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/inline-model-variable-substitution/m-p/142074#M4842</guid>
      <dc:creator>PapantzinCid</dc:creator>
      <dc:date>2013-02-27T03:41:19Z</dc:date>
    </item>
  </channel>
</rss>

