<?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: How can I view a multivalue output parameter as several values in ModelBuilder? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211534#M7213</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unfortunately, the number of variables a tool outputs is fixed -- they are part of the tool signature.&amp;nbsp; There is no tool (or tool you can create) that dynamically creates some unknown number of outputs.&amp;nbsp; Iteration with lists/series is probably your best bet.&amp;nbsp; The only other thing I can think of is a hack -- create a script tool that outputs a known number of rasters -- a sufficiently large number of variables to handle whatever multivalue input you give it, then populate each output raster.&amp;nbsp; In Python, it would be something like this:&lt;BR /&gt;&lt;BR /&gt;in_multivalue = gp.getparameterastext(0)&lt;BR /&gt;rasters = in_multivalue.split(";")&lt;BR /&gt;i = 1&lt;BR /&gt;for raster in rasters:&lt;BR /&gt;&amp;nbsp; gp.setparameterastext(i, raster)&lt;BR /&gt;&amp;nbsp; i = i + 1&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am OK with this approach as long as I can control which output variables are visible in ModelBuilder. For instance, if the user supplies 3 rasters for the tool, 3 green ovals will show up as the tool's output (instead of 3 green ovals and 37 white ovals). This way the user gets a less messy model. Is this possible?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 May 2010 17:12:41 GMT</pubDate>
    <dc:creator>AustinMilt</dc:creator>
    <dc:date>2010-05-13T17:12:41Z</dc:date>
    <item>
      <title>How can I view a multivalue output parameter as several values in ModelBuilder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211530#M7209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Let's say I have a script tool that takes 1+ input rasters and outputs them with the same extent to a directory. The input rasters go in a multivalue Raster Layer and the output rasters go in a derived multivalue Raster Layer. In ModelBuilder, the output shows up, as expected, as a Raster Layer table. However, I want ModelBuilder to split the table into individual Raster Layers, one for each output (i.e. there should be a green oval for each output raster). I need the behavior to be like this because each of the multiple output rasters goes into a different tool or a different tool parameter in subsequent steps in the model. Is this possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 19:58:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211530#M7209</guid>
      <dc:creator>AustinMilt</dc:creator>
      <dc:date>2010-05-11T19:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I view a multivalue output parameter as several values in ModelBuilder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211531#M7210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are working with 9.3 or 9.3.1 try using the variable of type list or series. List of inputs will all run together and create a list of individual outputs. The individual outputs will have to use %i% in the output name as in-line variable substitution. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Download this example and read help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/geoprocessing/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=15728"&gt;http://resources.esri.com/geoprocessing/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=15728&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Read how to use lists, series and inline variable substitution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Iteration_using_Lists"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Iteration_using_Lists&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Iteration_using_Series"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Iteration_using_Series&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=In-line_variable_substitution"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=In-line_variable_substitution&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope it helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 21:14:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211531#M7210</guid>
      <dc:creator>ShitijMehta</dc:creator>
      <dc:date>2010-05-12T21:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I view a multivalue output parameter as several values in ModelBuilder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211532#M7211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you are working with 9.3 or 9.3.1 try using the variable of type list or series. List of inputs will all run together and create a list of individual outputs. The individual outputs will have to use %i% in the output name as in-line variable substitution. &lt;BR /&gt;&lt;BR /&gt;Download this example and read help:&lt;BR /&gt;&lt;A href="http://resources.esri.com/geoprocessing/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=15728"&gt;http://resources.esri.com/geoprocessing/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=15728&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Read how to use lists, series and inline variable substitution:&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Iteration_using_Lists"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Iteration_using_Lists&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Iteration_using_Series"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Iteration_using_Series&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=In-line_variable_substitution"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=In-line_variable_substitution&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Hope it helps.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've read on using the list/series variables to do what you suggest but have never actually tried it. While it is a solution, I'd rather not resort to it. I would think it a simple and worthwhile task to split a multivalue output variable into several several variables, but maybe ESRI hadn't thought of doing so yet?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 12:09:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211532#M7211</guid>
      <dc:creator>AustinMilt</dc:creator>
      <dc:date>2010-05-13T12:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can I view a multivalue output parameter as several values in ModelBuilder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211533#M7212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unfortunately, the number of variables a tool outputs is fixed -- they are part of the tool signature.&amp;nbsp; There is no tool (or tool you can create) that dynamically creates some unknown number of outputs.&amp;nbsp; Iteration with lists/series is probably your best bet.&amp;nbsp; The only other thing I can think of is a hack -- create a script tool that outputs a known number of rasters -- a sufficiently large number of variables to handle whatever multivalue input you give it, then populate each output raster.&amp;nbsp; In Python, it would be something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;in_multivalue = gp.getparameterastext(0)
rasters = in_multivalue.split(";")
i = 1
for raster in rasters:
&amp;nbsp; gp.setparameterastext(i, raster)
&amp;nbsp; i = i + 1&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:24:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211533#M7212</guid>
      <dc:creator>DaleHoneycutt</dc:creator>
      <dc:date>2021-12-11T10:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I view a multivalue output parameter as several values in ModelBuilder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211534#M7213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unfortunately, the number of variables a tool outputs is fixed -- they are part of the tool signature.&amp;nbsp; There is no tool (or tool you can create) that dynamically creates some unknown number of outputs.&amp;nbsp; Iteration with lists/series is probably your best bet.&amp;nbsp; The only other thing I can think of is a hack -- create a script tool that outputs a known number of rasters -- a sufficiently large number of variables to handle whatever multivalue input you give it, then populate each output raster.&amp;nbsp; In Python, it would be something like this:&lt;BR /&gt;&lt;BR /&gt;in_multivalue = gp.getparameterastext(0)&lt;BR /&gt;rasters = in_multivalue.split(";")&lt;BR /&gt;i = 1&lt;BR /&gt;for raster in rasters:&lt;BR /&gt;&amp;nbsp; gp.setparameterastext(i, raster)&lt;BR /&gt;&amp;nbsp; i = i + 1&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am OK with this approach as long as I can control which output variables are visible in ModelBuilder. For instance, if the user supplies 3 rasters for the tool, 3 green ovals will show up as the tool's output (instead of 3 green ovals and 37 white ovals). This way the user gets a less messy model. Is this possible?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 17:12:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211534#M7213</guid>
      <dc:creator>AustinMilt</dc:creator>
      <dc:date>2010-05-13T17:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How can I view a multivalue output parameter as several values in ModelBuilder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211535#M7214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am OK with this approach as long as I can control which output variables are visible in ModelBuilder. For instance, if the user supplies 3 rasters for the tool, 3 green ovals will show up as the tool's output (instead of 3 green ovals and 37 white ovals). This way the user gets a less messy model. Is this possible?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No -- not possible&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 17:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211535#M7214</guid>
      <dc:creator>DaleHoneycutt</dc:creator>
      <dc:date>2010-05-13T17:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I view a multivalue output parameter as several values in ModelBuilder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211536#M7215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;No -- not possible&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can't say I'm surprised to be let down again. I guess I'll go with the list/series option. Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 17:21:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211536#M7215</guid>
      <dc:creator>AustinMilt</dc:creator>
      <dc:date>2010-05-13T17:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: How can I view a multivalue output parameter as several values in ModelBuilder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211537#M7216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried shitijmehta's suggestion to no avail. I needed to recombine outputs from the list/series processes and use them in a single tool at the same time. I did however devise an alternative, which I'm happy enough with to use. The basic idea is to take a multivalue raster variable and split it into individual outputs (which is what I wanted in the first place). The downside to my approach is the user has to do it himself in ModelBuilder. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The strategy is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Create a script with these 3 lines of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcgisscripting
gp = arcgisscripting.create()
gp.SetParameterAsText(2,gp.GetParameterAsText(1))
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Create a script tool with the script from #1 as the input script and these parameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;name: whatever, data&amp;nbsp; type: any value, default everything else&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;name: whatever1, data type: string, multivalue: yes, default others&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;name: output, data type: raster dataset (or whatever type you need), type: derived, default everything else&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;BR /&gt;&lt;SPAN&gt;3. The Tool Validator script should read:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;class ToolValidator:
&amp;nbsp; """Class for validating a tool's parameter values and controlling
&amp;nbsp; the behavior of the tool's dialog."""

&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Setup the Geoprocessor and the list of tool parameters."""
&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcgisscripting as ARC
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.GP = ARC.create(9.3)
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.params = self.GP.getparameterinfo()

&amp;nbsp; def initializeParameters(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Refine the properties of a tool's parameters.&amp;nbsp; This method is
&amp;nbsp;&amp;nbsp;&amp;nbsp; called when the tool is opened."""
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.params[1].Enabled = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.params[1].Filter.List = []
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; return

&amp;nbsp; def updateParameters(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Modify the values and properties of parameters before internal
&amp;nbsp;&amp;nbsp;&amp;nbsp; validation is performed.&amp;nbsp; This method is called whenever a parmater
&amp;nbsp;&amp;nbsp;&amp;nbsp; has been changed."""

&amp;nbsp;&amp;nbsp;&amp;nbsp; if self.params[0].Altered:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.params[1].Enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.params[1].Filter.List = str(self.params[0].Value).replace("'",'').split(';')

&amp;nbsp;&amp;nbsp;&amp;nbsp; if self.params[1].Altered:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.params[2].Value = str(self.params[1].Value)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; return

&amp;nbsp; def updateMessages(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Modify the messages created by internal validation for each tool
&amp;nbsp;&amp;nbsp;&amp;nbsp; parameter.&amp;nbsp; This method is called after internal validation."""
&amp;nbsp;&amp;nbsp;&amp;nbsp; return
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. In Model Builder, add the above script tool and select your multivalue output from another process and the output you want to use as a raster in the following steps. You can do this for as many outputs from the multivalue output as you need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps someone&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:24:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-can-i-view-a-multivalue-output-parameter-as/m-p/211537#M7216</guid>
      <dc:creator>AustinMilt</dc:creator>
      <dc:date>2021-12-11T10:24:46Z</dc:date>
    </item>
  </channel>
</rss>

