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
I added an other model with dataset iterator to loop through all datasets in my geodatabase and use previous model as a sub model.
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.
-
1This would be something much easier to do in python, I would recommend you abandon the model builder approach.Hornbydd– Hornbydd2021年09月07日 18:49:01 +00:00Commented Sep 7, 2021 at 18:49
-
Unfortunately, I need to know solution for model builder!Hilal Al-Rajhi– Hilal Al-Rajhi2021年09月07日 18:50:48 +00:00Commented Sep 7, 2021 at 18:50
-
1What 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?Hornbydd– Hornbydd2021年09月07日 18:54:36 +00:00Commented 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.Hilal Al-Rajhi– Hilal Al-Rajhi2021年09月07日 20:10:33 +00:00Commented 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.Hornbydd– Hornbydd2021年09月08日 10:18:51 +00:00Commented Sep 8, 2021 at 10:18
1 Answer 1
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.
Explore related questions
See similar questions with these tags.