1

I think I may have found a ModelBuilder bug.

Would it be possible for someone to try and follow my procedure to see if they agree, and if so, to try and suggest a workaround that still uses ModelBuilder, other than only ever running this model while it is open for editing?

I already know how to do this using ArcPy, but I was trying to show how easy it was to do using ModelBuilder too.

I'm happy to accept an answer without it containing a workaround because what I am really after is a sanity check on my procedure and observed results. If it is a bug I would be keen to know an NIM number and whether it is fixed in the ModelBuilder from either or both of the ArcMap and ArcGIS Pro applications of ArcGIS 10.3 for Desktop.

I am using ArcGIS 10.2.2 for Desktop and a File Geodatabase. I have my Geoprocessing environment set to overwrite.

  1. I used Create Fishnet to create a 2x2 fishnet with cells 1x1 in size called FishnetFC, added a field called Name and updated that field so that the attribute table has the appearance below. Using any polygon feature class with any field of type text populated with unique vales should be fine to test with.

enter image description here

  1. I then made the model below which has no parameters

enter image description here

  1. I configured the Iterate Field Values tool as below

enter image description here

  1. I configured the Select tool as below

enter image description here

  1. The Value variable is a precondition to the Select tool but that does not appear to be important because I have tried with and without that.
  2. When I run the model while it is open it produces four feature classes called FC1, FC2, FC3 and FC4 as expected

The output is:

Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:03:02 2014
Succeeded at Tue Nov 11 17:03:02 2014 (Elapsed Time: 0.06 seconds)
Executing (Select): Select C:\polygeo\test.gdb\FishnetFC C:\polygeo\test.gdb\FC1 "Name = 'FC1'"
Start Time: Tue Nov 11 17:03:02 2014
Succeeded at Tue Nov 11 17:03:02 2014 (Elapsed Time: 0.44 seconds)
Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:03:03 2014
Succeeded at Tue Nov 11 17:03:03 2014 (Elapsed Time: 0.00 seconds)
Executing (Select): Select C:\polygeo\test.gdb\FishnetFC C:\polygeo\test.gdb\FC2 "Name = 'FC2'"
Start Time: Tue Nov 11 17:03:03 2014
Succeeded at Tue Nov 11 17:03:03 2014 (Elapsed Time: 0.46 seconds)
Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:03:03 2014
Succeeded at Tue Nov 11 17:03:03 2014 (Elapsed Time: 0.00 seconds)
Executing (Select): Select C:\polygeo\test.gdb\FishnetFC C:\polygeo\test.gdb\FC3 "Name = 'FC3'"
Start Time: Tue Nov 11 17:03:04 2014
Succeeded at Tue Nov 11 17:03:04 2014 (Elapsed Time: 0.44 seconds)
Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:03:04 2014
Succeeded at Tue Nov 11 17:03:04 2014 (Elapsed Time: 0.00 seconds)
Executing (Select): Select C:\polygeo\test.gdb\FishnetFC C:\polygeo\test.gdb\FC4 "Name = 'FC4'"
Start Time: Tue Nov 11 17:03:04 2014
Succeeded at Tue Nov 11 17:03:05 2014 (Elapsed Time: 0.39 seconds)
Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:03:05 2014
Succeeded at Tue Nov 11 17:03:05 2014 (Elapsed Time: 0.00 seconds)
  1. When I save and close the model, before running it that way instead it produces only two feature classes called FC1 and FC2 - I think this has to be a bug!

This time the output is unexpectedly as below. I have placed asterisks (**) where it departs from what I would have expected.

Executing: SelectByAttribute
Start Time: Tue Nov 11 17:04:34 2014
Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:04:34 2014
Succeeded at Tue Nov 11 17:04:34 2014 (Elapsed Time: 0.05 seconds)
Executing (Select): Select C:\polygeo\test.gdb\FishnetFC C:\polygeo\test.gdb\FC1 "Name = 'FC1'"
Start Time: Tue Nov 11 17:04:34 2014
Succeeded at Tue Nov 11 17:04:34 2014 (Elapsed Time: 0.28 seconds)
Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:04:34 2014
Succeeded at Tue Nov 11 17:04:34 2014 (Elapsed Time: 0.00 seconds)
Executing (Select): Select C:\polygeo\test.gdb\FishnetFC C:\polygeo\test.gdb\FC2 "Name = 'FC2'"
Start Time: Tue Nov 11 17:04:34 2014
Succeeded at Tue Nov 11 17:04:35 2014 (Elapsed Time: 0.27 seconds)
Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:04:35 2014
Succeeded at Tue Nov 11 17:04:35 2014 (Elapsed Time: 0.00 seconds)
Executing (Select): **Select C:\polygeo\test.gdb\FishnetFC C:\polygeo\test.gdb\FC1 "Name = 'FC3'"**
Start Time: Tue Nov 11 17:04:35 2014
Succeeded at Tue Nov 11 17:04:35 2014 (Elapsed Time: 0.39 seconds)
Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:04:35 2014
Succeeded at Tue Nov 11 17:04:35 2014 (Elapsed Time: 0.00 seconds)
Executing (Select): **Select C:\polygeo\test.gdb\FishnetFC C:\polygeo\test.gdb\FC1 "Name = 'FC4'"**
Start Time: Tue Nov 11 17:04:35 2014
Succeeded at Tue Nov 11 17:04:36 2014 (Elapsed Time: 0.45 seconds)
Executing (Iterate Field Values): IterateFieldValues C:\polygeo\test.gdb\FishnetFC Name String false false #
Start Time: Tue Nov 11 17:04:36 2014
Succeeded at Tue Nov 11 17:04:36 2014 (Elapsed Time: 0.00 seconds)
Succeeded at Tue Nov 11 17:04:36 2014 (Elapsed Time: 1.89 seconds)
7
  • I've just recreated your model, saved it in the same fGDB as the input and output datasets and it ran without any problems whilst in model builder or as a parameter-less model tool. My test layer was loaded into ArcMap so it was a FeatureLayer input to the iterator.
    – Hornbydd
    Commented Nov 11, 2014 at 11:47
  • @Hornbydd Thanks for testing - can you confirm your version? Your test sounds accurate and I tried both feature layer and feature class as inputs. I'll start my test from scratch after a reboot tomorrow to see if I have better luck.
    – PolyGeo
    Commented Nov 11, 2014 at 12:15
  • Sorry forgot to add that bit of info. It is on a 10.2.2 setup on a 64 bit windows 7 machine.
    – Hornbydd
    Commented Nov 11, 2014 at 13:59
  • @Hornbydd That sounds like an identical setup to mine but when I rebooted and created a new toolbox and tool I got the same incorrect result. Are you able to double-check that all expected output feature classes are present in your test. In mine I expected to get feature classes FC1, FC2, FC3 and FC4 but only FC1 (which was overwritten twice by the tool) and FC2 resulted.
    – PolyGeo
    Commented Nov 11, 2014 at 23:30
  • 1
    I've double checked; I get 4 output feature classes each with the correct polygon. Sorry it works for me! I'm wondering if it is something to do with that Windows update that zapped file geodatabases, have you tried this model using say shapefiles?
    – Hornbydd
    Commented Nov 12, 2014 at 9:56

0