Select to view content in your preferred language

Select unique values from two fields, then create feature class

1665
2
Jump to solution
09-05-2019 11:45 AM
MalcolmLittle
Regular Contributor

Hello,

I'm trying to discover how best to automate the selection and subsequent creation of new feature classes from two text fields. In my case, one of the fields is an ID field, and one is a day-of-the-week field. I would want to create individual feature classes per ID AND day-of-the-week.

I initially figured to use ModelBuilder, add "Select Layer By Attribute", but don't know how to automatically change the selection, make a new class from it, and clear the selection for the next. I have a hunch about Iterators, but am unfamiliar.

0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor

There is an iterator that selects groups off a layer for every unique combination of fields. You could use this on a layer input to the iterator, followed by the Copy Features tool to copy each group to a new output. The help on the tool has some examples. I'd also read the model builder help on iterators, there are good examples there too.

Iterate Feature Selection—Tools | ArcGIS Desktop 

View solution in original post

2 Replies
curtvprice
MVP Esteemed Contributor

There is an iterator that selects groups off a layer for every unique combination of fields. You could use this on a layer input to the iterator, followed by the Copy Features tool to copy each group to a new output. The help on the tool has some examples. I'd also read the model builder help on iterators, there are good examples there too.

Iterate Feature Selection—Tools | ArcGIS Desktop 

DanPatterson_Retired
MVP Emeritus