+ Reply to Thread
Results 1 to 4 of 4

Thread: Model Builder - Iterate Feature Classes

  1. #1
    Steve Walker
    Join Date
    Oct 2010
    Posts
    2
    Points
    0
    Answers Provided
    0


    0

    Default Model Builder - Iterate Feature Classes

    I want to create a model that iterates through all the layers in my table of contents and clears any features currently selected. I bring the Iterate Feature Classes iterator into my model and link my geodatabase to the tool. The output is shown as the first feature class in the TOC. The tool runs with no errors but my only output is the first layer in my TOC and nothing else. I need the iterate tool to run through each layer in conjunction with the Select Layer by Attribute (Clear_Selection type) or a better tool to make sure there are no features selected prior to moving on to other steps. This is my first use of an iterator so I am sure I am missing something simple.
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	Export Graphic.jpg‎
Views:	239
Size:	55.2 KB
ID:	4314  

  2. #2
    Duncan Hornby
    Join Date
    Apr 2010
    Posts
    930
    Points
    310
    Answers Provided
    52


    0

    Exclamation Re: Model Builder - Iterate Feature Classes

    Steve,

    What you are asking is not possible. The iterators work with FeatureClasses in their workspace. But to visualise a selection you are working with a FeatureLayer. If you look at the input requires of the SelectByAttribute tool that takes a FeatureLayer and not a FeatureClass. A tool to iterate over FeatureLayers does not exist.

    Duncan

  3. #3
    Allen Poling
    Join Date
    Apr 2010
    Posts
    8
    Points
    0
    Answers Provided
    1


    0

    Default Re: Model Builder - Iterate Feature Classes

    I'd try using a MultiValue iterator. To limit the values to feature layers you can create a stand alone variable having a feature layer data type and connect the variable to the Input Values parameter of the Iterate Multivalue as described in the Help topic Iterate Multivalue.

  4. #4
    Duncan Hornby
    Join Date
    Apr 2010
    Posts
    930
    Points
    310
    Answers Provided
    52


    0

    Thumbs up Re: Model Builder - Iterate Feature Classes

    Allen,

    Good call, I've never used the MultiValue Iterator. Looks like a very useful tool.

    I've attached a screen shot of my model that would cycle through all the FeatureLayers in the map document clearing any selections.

    Duncan
    Attached Thumbnails Attached Thumbnails Click image for larger version

Name:	Export Graphic.png‎
Views:	323
Size:	9.4 KB
ID:	5310  

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts