3

I am trying to make what I thought was a very simple batch processing tool, but I can't get the output to work properly. I would like the model to iterate through a geodatabase, join each feature class with the counties feature class, export that join (Copy Features) to a new feature class, remove the join, and repeat with the next for a total of 240 iterations.

After looking at the geoprocessing results, I believe the issue lies somewhere in the Copy Features tool. The model results in one feature class with the name of the first iteration's output, "AGWT", and the values of the last iteration, "YTVI", in the table. So it appears to run through each of the 240 feature classes, but keeps the name of the first output and thus overwrites all subsequent outputs.

The Copy Features Output looks like this: C:\ ...\Exports.gdb\%Name%c

Any ideas/questions/recommendations?

Model_Screenshot

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Sep 24, 2014 at 21:56
6
  • If you copy this model to a test model and take the Add and Remove Join tools out does it iterate and perform the copies OK? If it does not, then I would simplify your question to that first. If it does, then I think we need to focus on and see your settings for the Add Join tool. Commented Sep 24, 2014 at 22:36
  • I removed the Add & Remove Join tools and got the same output: a single feature class. Commented Sep 25, 2014 at 15:04
  • Update: Replacing the Copy Features tool with Feature Class to Feature Class resolves the output naming/replacement issue. For example, now I get 240 feature classes in the output location; however, now only the first iteration results in a proper join and export. The remaining 239 outputs contain nulls in the fields from the Join Table. I also tried connecting the Remove Join to "SouthDakota_Counties (2)" rather than "SouthDakota_Counties", but I get the same results. Commented Sep 25, 2014 at 20:10
  • If it were me I would feed the output (Feature Class) of the iterator into a Make FeatureLayer tool first as according to the Help the Add Join takes as input a Layer and not a Feature Class. Commented Sep 25, 2014 at 22:20
  • @Hornbydd It yields the same results (tried it with both Copy Features and Feature Class to Feature Class). Commented Sep 26, 2014 at 3:09

1 Answer 1

3

I'm not sure this is the answer that I was looking for (especially since the original model worked for another user), but I ended up getting it to run successfully with a bit of a work-around. I put everything after Add Join into a submodel and it worked perfectly. enter image description here

answered Sep 26, 2014 at 13:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.