Select to view content in your preferred language

Can a model be used to iteratively select all features with specific value in field and the export each value selection group as a feature class?

3231
3
02-19-2016 05:05 AM
JonathanHallam1
Regular Contributor

I have been trying to create a model from similar examples but failed.

I have a feature class with one column with 3 specific values of status of each feature in that feature class and I want the feature class split up by these specific statuses with a automatic model where I only have change the input file and edit the output file names as this process will be done monthly for monthly data.

This is to try and save time selecting the attributes and exporting.

The input dataset has to be a feature class.

Any help would be appreciated.

Regards

Jonathan

0 Kudos
3 Replies
BenjaminMittler
Frequent Contributor

I don't think you would need to use an iterator for this. Set up your model so that from your dataset you have three different "select by attribute" branches, one for each value. Follow these three up with "Make Feature Layer' and from there you should be able to achieve what you described.

The model would require 1 input parameter and 3 outputs.

DanPatterson_Retired
MVP Emeritus

since you are doing this in a gdb, do you by chance have and advanced license?  If so, Split—Help | ArcGIS for Desktop

can be used in your model

0 Kudos
GabrielUpchurch1
Deactivated User

There are probably dozens of ways this could be accomplished with ModelBuilder.  Benjamin's suggestion should work fine but I thought I would over-complicate things with an iterator approach and lots of inline variable substitution.  Just for fun, you know.

Basically, I used Iterate Field Values to grab each unique value from a field in a feature class and feed it into the query expression parameter of the Feature Class To Feature Class tool.  I parameterized the model so that it can be run like any other GP tool by specifying the input feature class, the field containing the unique status values, the output GDB, and basename to use in naming the output feature classes.  I have attached a diagram and a sample model for you to examine if interested.  I added the field parameter after creating the diagram so the diagram doesn't exactly reflect the current state of the attached model.  Let me know if you have any questions.

0 Kudos