Tuesday, 11 August 2015

arcgis desktop - ModelBuilder not adding output feature class to Table of Contents?


I'm trying to create a tool in ModelBuilder that will take a new point from a user, create a feature class for this point and display it on a map.


What I've done is:



  1. I've created a feature class for a point-like feature in ArcCatalog.

  2. I've prepared a really simple model in ModelBuilder, that starts with a feature set variable (which takes the feature class as a schema and symbology file). The variable is marked as a parameter.

  3. Next I'm using the Copy Features tool that takes the variable as input and saves it as a feature class in my scratch workspace.

  4. The output feature class is marked as a parameter with the 'add to display' option.



After the module is run I get a shapefile in my scratch workspace. I can add it manually to TOC and it contains the selected point. However no matter what I do, I can't display it in TOC automatically after the model completes.


There is a known issue described in several places that doesn't allow to display newly created layers in TOC when model finishes with the 'add to display' option. However there's a quick workaround, which is to mark the output layer as parameter. In my case it doesn't work.


I'm using ArcGIS for Desktop 10.1 on Windows 7 x86_64.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...