<?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: Feature Class Not Added to Display / Table of Contents When a Variable Name is Us in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157942#M5307</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;My sample model includes a parameter output. In the one that has a hard-coded name, the output is added to the map. In the one that includes a variable in the output name, the output is not added to the map. I think this is an ESRI bug.&lt;BR /&gt;&lt;BR /&gt;Your suggestion gave me a workaround for this issue for the time being. Thanks!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You're very welcome. If you haven't filed support incident and gotten a NIM, please do -- this will greatly increase the chances of Esri getting the problem fixed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Mar 2013 14:51:04 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2013-03-15T14:51:04Z</dc:date>
    <item>
      <title>Feature Class Not Added to Display / Table of Contents When a Variable Name is Used</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157939#M5304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a relatively complex model, where I would like to allow the user to input a Scenario Name as a parameter and have the model use that parameter to name the output feature classes appropriately. For example: Scenario1_Points; Scenario1_Lines; Scenario1_Polygons, etc. They would then be able to run the model a second time and create new outputs while the previous outputs do not get overwritten.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To do this, I have a string parameter, and when the output FC name is specified, it is C:\Tools\Model\Model_Output.gdb\%ScenarioName%_Points&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This method works perfectly when the model is run within the Edit mode of ModelBuilder. However, when the model is saved and run as a tool, the layer is created, with the correct name, but the layer is not added to the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The model is being run from within ArcMap, not ArcCatalog. I have the Scenario Name input marked as a parameter and the output FC is marked as a parameter. Under the Geoprocessing menu, Display/Temporary Data, the "Add results of geoprocessing operations to the display" is checked. I have somewhat exhaustively searched the forums and Google, but can't find mention of variable names preventing data from being added to the table of contents.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can confirm that the variable name is the issue, because when I remove the variable and hard code the FC name, the FC is added to the map correctly, even when the model is run as a tool. I have attached a toolbox with two very simple tools to demonstrate the issue. They are identical, except that one of them has a user input parameter, which is used to name the output. The other one has a hard-coded output name. They place the output in a GDB at C:\Tools\Bug_Test\Model_Output.gdb.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am running ArcGIS Desktop 10 Service Pack 5 (Build 4400), ArcInfo license.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Similar threads that have not helped:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thread: Modelbuilder as a tool is not the same as running the same model in modelbuilder?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/48066-Modelbuilder-as-a-tool-is-not-the-same-as-running-the-same-model-in-modelbuilder?highlight=variable+output+display"&gt;http://forums.arcgis.com/threads/48066-Modelbuilder-as-a-tool-is-not-the-same-as-running-the-same-model-in-modelbuilder?highlight=variable+output+display&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thread: modelbuilder result won't add to TOC (cont.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/7255-modelbuilder-result-won-t-add-to-TOC-%28cont.%29"&gt;http://forums.arcgis.com/threads/7255-modelbuilder-result-won-t-add-to-TOC-%28cont.%29&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;modelbuilder result won't add to TOC&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/thread.asp?t=303855&amp;amp;f=1728&amp;amp;c=93"&gt;http://forums.esri.com/thread.asp?t=303855&amp;amp;f=1728&amp;amp;c=93&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Displaying model data&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Displaying_model_data/002w0000003q000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Displaying_model_data/002w0000003q000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tutorial: Creating tools with ModelBuilder&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002w0000007v000000"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002w0000007v000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thread: Model builder won't add output of process&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/41125-Model-builder-won-t-add-output-of-process?highlight=variable+output+display"&gt;http://forums.arcgis.com/threads/41125-Model-builder-won-t-add-output-of-process?highlight=variable+output+display&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A quick tour of creating tools with ModelBuilder&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/A_quick_tour_of_creating_tools_with_ModelBuilder/002w0000007m000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/A_quick_tour_of_creating_tools_with_ModelBuilder/002w0000007m000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Creating model parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_model_parameters/002w0000003z000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_model_parameters/002w0000003z000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tutorial: Executing tools in ModelBuilder&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00210000003v000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00210000003v000000&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2013 19:14:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157939#M5304</guid>
      <dc:creator>SethSobel</dc:creator>
      <dc:date>2013-03-08T19:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Not Added to Display / Table of Contents When a Variable Name is Us</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157940#M5305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;This method works perfectly when the model is run within the Edit mode of ModelBuilder. However, when the model is saved and run as a tool, the layer is created, with the correct name, but the layer is not added to the map.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is how all tools (including script tools) work. If the output is not a parameter, it will not be added to the map. The "Add To Display" property of a Model Builder element only works when running the model in Edit mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With script tools, you can set the output as "Derived" so the output parameter exists, but doesn't show up in the tool dialog. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may be able to get around this in 10.0 by using arcpy.mapping in a Calculate Value tool code block to add the layer to the current data frame.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s300000025000000"&gt;Arc 10.0 help: AddLayer&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Mar 2013 04:48:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157940#M5305</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-03-10T04:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Not Added to Display / Table of Contents When a Variable Name is Us</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157941#M5306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This is how all tools (including script tools) work. If the output is not a parameter, it will not be added to the map.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yep, I understand that. My sample model includes a parameter output. In the one that has a hard-coded name, the output is added to the map. In the one that includes a variable in the output name, the output is not added to the map. I think this is an ESRI bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You may be able to get around this in 10.0 by using arcpy.mapping in a Calculate Value tool code block to add the layer to the current data frame.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your suggestion gave me a workaround for this issue for the time being. Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 02:15:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157941#M5306</guid>
      <dc:creator>SethSobel</dc:creator>
      <dc:date>2013-03-15T02:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Not Added to Display / Table of Contents When a Variable Name is Us</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157942#M5307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;My sample model includes a parameter output. In the one that has a hard-coded name, the output is added to the map. In the one that includes a variable in the output name, the output is not added to the map. I think this is an ESRI bug.&lt;BR /&gt;&lt;BR /&gt;Your suggestion gave me a workaround for this issue for the time being. Thanks!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You're very welcome. If you haven't filed support incident and gotten a NIM, please do -- this will greatly increase the chances of Esri getting the problem fixed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 14:51:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157942#M5307</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2013-03-15T14:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Class Not Added to Display / Table of Contents When a Variable Name is Used</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157943#M5308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have been facing&amp;nbsp; the same issue&amp;nbsp; for couple of years , and I have worked this out.&amp;nbsp; I have searched all the links you posted her. Finally I have a working solution. This solution is&amp;nbsp; similar to Curtis Price suggested.&amp;nbsp; Please try this Toolbox. This solves one more issue. You can hide the output parameter from user by using a wrapper model ( here&amp;nbsp; Use Test Model Main).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 20:18:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/feature-class-not-added-to-display-table-of/m-p/157943#M5308</guid>
      <dc:creator>SurendranNeelakantan</dc:creator>
      <dc:date>2014-08-01T20:18:56Z</dc:date>
    </item>
  </channel>
</rss>

