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

  • 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. – PolyGeo Sep 24 '14 at 22:36
  • I removed the Add & Remove Join tools and got the same output: a single feature class. – Britt W Sep 25 '14 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. – Britt W Sep 25 '14 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. – Hornbydd Sep 25 '14 at 22:20
  • @Hornbydd It yields the same results (tried it with both Copy Features and Feature Class to Feature Class). – Britt W Sep 26 '14 at 3:09
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.