I want to run the following Model enter image description here

The problem is that when it reaches the copy features tool the model stops and throws an error saying that %Name%_layer (3) is not a feature class and I don't understand why.

Also if I first extract the statistics table and then combine the table with the layer in 2 different models it works fine.

Any ideas why this is happening?

  • What is the value of %Name% at that point in your model? – PolyGeo Sep 10 '16 at 8:42
  • Try adding a Make Feature Layer between Add join and Copy Features – BERA Sep 10 '16 at 11:19

It seems to me like the issue is that once you do the 'Add Join' during the model process the Name_layer is only stored in temporary memory, so it needs to be created. This is mostly a guess. My first try would be to try to use a spatial join instead of an Add Join if you can. If that didn't work I would attempt to create a new feature from the added join inside that model by using the Name_Layer as the input. Hopefully this would make sure that if for some reason there was no geometry on your file it would be created.

So Name_Layer > Make XY > Copy Features

This also assumes it is point data, if it is polygons, you'll have to take that step further and do the polygon creation. if you need help with that its pretty easy to find on google.

enter image description here

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