Collect Values Tool and Union in Model Builder

3508
5
05-01-2012 10:11 AM
ZackRoehr
New Contributor
Is there a way to feed a list of values into a Union in model builder?  Basically, I have FGDBs with varying numbers of features which need to be fed to a Union.  By using a feature class iterator and collect values I am able to create a list of variable length of the feature class names in each FGDB.  I would like to then feed this to a union.  It will only let me map this layer list as a precondition.  Anyone know of a work aroudn or another way to approach this?  I suspect the reason the union will not accept it as input is due to the presence of the 'Rank' field in the Union input table since the collect values list output will readily feed into other tools such as merge, append, etc..

Thanks in advance!
0 Kudos
5 Replies
ShitijMehta
Esri Regular Contributor
You are correct. Union has the parameter of data type Value Table and the output of Collect Values is a Multiple Values.

Share a snap shot/or your data to suggest a workaround.

Will Merge or Append not work for your case?
0 Kudos
ZackRoehr
New Contributor
Thank you for your response.  Merge and append do not provide the type of valuable attribute data that a union provides.  As you know they differ greatly from union and are dependant upon a desire by the user to bring data in to an existing schema rather than a desire to evaluate overlap characteristics.

Is there any way in model builder to create a value table, perhaps from several value lists, which can then be fed into a union?
0 Kudos
ShitijMehta
Esri Regular Contributor
Ok I understand your point.

At present there is no way to create a value list variable in the model and connect it to the Union tool. Python script is the way to go. I created a script tool, but before I share I need to know - if you will use the Rank field for any of your input feature classes? If not I can share the simple script tool else I would have to modify it to include the ranks.
0 Kudos
ShitijMehta
Esri Regular Contributor
try the attached script tool. You can modify the script tool if you require.

+

since you are using the iterator (which runs multiple times) and the Union tool (which should run just one time) you will have to created a nested model/model within a model. See attached tbx.
0 Kudos
DavidCampbell
New Contributor III
I realize it has been a while since this post, but I have need for something similar and am looking for some help. I have a model that iterates through row selections and creates a coverage. I need each of these coverages unioned and can't figure out how to loop all the unions that I would need. I am not the best python guy yet, so I was hoping that you could help me through your python code considering I need to use coverage union.

Thanks,

David

[ATTACH=CONFIG]33560[/ATTACH]
0 Kudos