3

I'm trying to use ModelBuilder in ArcMap 10.2 to select features from a large data set (>30,000 features) based on a value in the field "Route" and have those selected features export to a file location with the the output containing the string "Route_" concatenated with the current selection criteria.

So for example, I want the tool to look at the filed route and select the first group of values, say Route = 101, export those features to a gdb dataset with the output name Route_101. Then the tool would select the next group of features, say "Route" = 102 and then export the selection to the same output location with the output name Route_102...and so on.

Model_Builder

1 Answer 1

3

I think you're pretty close with the Modelbuilder script you posted above. The "Iterate Feature Selection" tool returns the field value of the group of features currently being iterated through in the Value variable (not in Route). This variable can then be used as an inline variable to define the output path of each iteration using the %x% notation.

In the final output (Route_%Route%), change your desired destination path from something like C:/Route_X.shp to C:/Route_%Value%.shp. That should create a new correctly labelled output shapefile for each iterated field value in the dataset.

2
  • Thanks Robbi. Oddly enough it started working with no changes made.
    – geoJshaun
    Commented Sep 9, 2015 at 22:36
  • @Shaun Feel free to mark the answer as accepted (green tick) if it helped you at all... glad to know your problem has been resolved! Commented Sep 10, 2015 at 1:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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