<?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: Raster input using inline variable substitution in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/raster-input-using-inline-variable-substitution/m-p/820253#M3544</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chris.&lt;/P&gt;&lt;P&gt;I found a solution! Despite searching thoroughly before posting, I hadn't seen the following:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/message/80678#80678"&gt;https://community.esri.com/message/80678#80678&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I applied the advice in the last comment.&lt;/P&gt;&lt;P&gt;I dropped the "Pan_Input" variable described and illustrated in my original post. Instead, I modified the expression in "Calculate Value (1)" from "%Name%".replace("m20","p10_1") to "D:\SomePath\%Name%".replace("m20","p10_1") and changed the data type from string to Raster Dataset. Lastly, the output of "Calculate Value (1)" was the direct input into the pan sharpen tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Revised_IterateRasters_PanSharpen.PNG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/120881_Revised_IterateRasters_PanSharpen.PNG" style="width: 620px; height: 242px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Aug 2015 21:42:40 GMT</pubDate>
    <dc:creator>DerrickKo_Heinrichs</dc:creator>
    <dc:date>2015-08-05T21:42:40Z</dc:date>
    <item>
      <title>Raster input using inline variable substitution</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/raster-input-using-inline-variable-substitution/m-p/820251#M3542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to figure out why I can't point to a raster as input (for pan sharpening) using inline variable substitution? I have no problem using inline variable sub as part of the output raster name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using ModelBuilder to iterating over a collection of multispectral rasters to be fed into the pansharpen tool. I'm using inline variable sub for the pan image input (actually as input into Make Raster Layer first):&lt;/P&gt;&lt;P&gt;D:\SomePath\%PanImageName%.tif&lt;/P&gt;&lt;P&gt;where %PanImageName% is the name of the Pan image that matches the current Multispectral image being processed by the Iterate Raster tool.&amp;nbsp; &lt;/P&gt;&lt;P&gt;To hopefully be more clear, the &lt;EM&gt;Name&lt;/EM&gt; variable coming off the Iterate Raster tool is passed through the Calculate Value tool with this expression... "%Name%".replace("m20","p10_1"), giving me the value &lt;EM&gt;PanImageName &lt;/EM&gt;used to identify the matching pan image.&lt;/P&gt;&lt;P&gt;I have added preconditions where the seemed necessary, but I just can't figure this one out.&lt;/P&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;ERROR&lt;/SPAN&gt; &lt;A href="#"&gt;000732&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Panchromatic Image: Dataset D:\SomePath\%PanImageName%.tif does not exist or is not supported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hoping somebody can help, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 20:28:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/raster-input-using-inline-variable-substitution/m-p/820251#M3542</guid>
      <dc:creator>DerrickKo_Heinrichs</dc:creator>
      <dc:date>2015-08-05T20:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Raster input using inline variable substitution</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/raster-input-using-inline-variable-substitution/m-p/820252#M3543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not exactly sure what is causing the issue, but this is a good starting point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's ESRI's explanation for the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.esri.com/es/knowledgebase/techarticles/detail/35151" title="http://support.esri.com/es/knowledgebase/techarticles/detail/35151"&gt;35151 - 000732: Dataset does not exist or is not supported&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you haven't tried them, look into their suggestions - maybe that will clear things up?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris Donohue, GISP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 20:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/raster-input-using-inline-variable-substitution/m-p/820252#M3543</guid>
      <dc:creator>ChrisDonohue__GISP</dc:creator>
      <dc:date>2015-08-05T20:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Raster input using inline variable substitution</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/raster-input-using-inline-variable-substitution/m-p/820253#M3544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chris.&lt;/P&gt;&lt;P&gt;I found a solution! Despite searching thoroughly before posting, I hadn't seen the following:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/message/80678#80678"&gt;https://community.esri.com/message/80678#80678&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I applied the advice in the last comment.&lt;/P&gt;&lt;P&gt;I dropped the "Pan_Input" variable described and illustrated in my original post. Instead, I modified the expression in "Calculate Value (1)" from "%Name%".replace("m20","p10_1") to "D:\SomePath\%Name%".replace("m20","p10_1") and changed the data type from string to Raster Dataset. Lastly, the output of "Calculate Value (1)" was the direct input into the pan sharpen tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Revised_IterateRasters_PanSharpen.PNG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/120881_Revised_IterateRasters_PanSharpen.PNG" style="width: 620px; height: 242px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 21:42:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/raster-input-using-inline-variable-substitution/m-p/820253#M3544</guid>
      <dc:creator>DerrickKo_Heinrichs</dc:creator>
      <dc:date>2015-08-05T21:42:40Z</dc:date>
    </item>
  </channel>
</rss>

