0

The goal of what I am trying to achieve is to get a list of all feature classes in every dataset in my geodatabase.

Through following blow URL I could successfully achieve result for one dataset level. https://desktop.arcgis.com/en/arcmap/10.3/analyze/modelbuilder/integrating-model-within-a-model.htm

enter image description here

I added an other model with dataset iterator to loop through all datasets in my geodatabase and use previous model as a sub model.

enter image description here

Now, as per my understanding in ModelBuilder, for each dataset iteration, the "Output Values" list from sub model will get overwritten.

How can I append the output of the sub model "Output Values" to an other list so at the end I will have a list with all feature classes in geodatabase?

I mean something like "append" or add new records to a list from "Output Values" until dataset iterator finishes.

After having all feature classes list of my geodatabase I can then do with it any geoprocessing that may suit. For example, I can merge all polygon feature classes and erase merge result from area of interest to create a land cover polygon.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Sep 7, 2021 at 17:40
6
  • 1
    This would be something much easier to do in python, I would recommend you abandon the model builder approach. Commented Sep 7, 2021 at 18:49
  • Unfortunately, I need to know solution for model builder! Commented Sep 7, 2021 at 18:50
  • 1
    What is it you actually want to create? You talk about lists but then you talk about using the append tool which will merge datasets into a single dataset, a single dataset is not a list? Commented Sep 7, 2021 at 18:54
  • I meant I tried to create multi value variable so I can every time append the list with feature classes from coming dataset iterations. But as I mentioned, I could not do it that way. The idea of using word "append" to save new list coming from sub model to a list that lasts until datataset iterator finishes. Commented Sep 7, 2021 at 20:10
  • Have you tried iterating over a single workspace rather than within feature datasets in the workspace? If you tick on recursive it should drill down into the feature datasets? I'm not at my computer so can't confirm that. That should collect all featureclasses in a workspace regardless if they are at the top level or in a feature dataset. Commented Sep 8, 2021 at 10:18

1 Answer 1

0

I found the answer to use the same logic used with collect values in sub model. I added another collect value in main model and connect it to output from sub model. This way, all feature classes in every dataset will be collected in this list. Now, use this model as sub model.

enter image description here

answered Sep 19, 2021 at 7:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.