I created a model that will iterate through a layer of polygons and complete these steps
- select the polygons one at a time
- select all points from a point class which fall within the polygon
- Append the selected points to an existing class (same schema)
- The appended class then has a name field added and the user selected “name” field from the selected polygon is field calculated to each point
This model works fine and produces the expected result.
I then wanted to be able to have the model create an empty point class with the same schema as the input point class so I would not need to do this manually prior to using my existing model. Since the existing model has an iterator and I only need to create the table once I need a main model which creates the table and then calls the sub-model to iterate through the polygons.
My new main model works as expected to create the class when I run it without the sub-model. When I try to link the output class of the main model to the sub-model I receive the following error;
I have tried numerous things but I cannot determine what “field name” is causing the issue. The only field name I use is in the sub-model which works fine when run stand-alone.
I have attached the models as a toolbox. Any class of polygons with a name field and any class of points should work for testing.
Any help is greatly appreciated.