Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This is similar to Modelbuilder - If precondition is false, continue iterating next input but I want the iterate tool to run to collect all the values and only then continue to the merge. Any ideas? Currently it just runs the whole process for each file (which works but takes much longer than if the merge is done only once) or I have to manually break the collect-merge link, run the iterate, reconnect the collect-merge link and then continue running the model which is a pain as it is a lot of towers that need processing and this collect values-finish getting all values and then continue will be required in other models as well.

enter image description here

I tried the "Select Data" tool as well but this doesn't allow for wildcard searches like the Iterate does -my Iterate has the "_Graded*" as the search param as the gdb included many other files related to each tower chunk.

My STOP is set to "True" (tried false as well). I also tried to connect the Stop to the Iterate instead of Collect values but same result.

=== SCRIPT ADDED

I just created a python tool for this and it collects all the values but it passes them back to the model as a long list -how can I get it to output in a proper format?

    import sys, os, arcpy

GDB=arcpy.GetParameterAsText(0)
Search=arcpy.GetParameterAsText(1)
Type=arcpy.GetParameterAsText(2)

##GDB=r'P:\2012\044_DM_Radio_Propogation\Working\Propogation\Propogation_28355.gdb'
##Search='_m'
##Type='Polygon'

path=os.path.dirname(GDB)
arcpy.env.workspace = GDB
List=[]
for item in arcpy.ListFeatureClasses('*'+Search+'*',Type):
    List.append(path+"\\"+item)
    #arcpy.SetParameterAsText(3, item)

arcpy.SetParameterAsText(3, List)
arcpy.AddMessage("List: "+str(List))

enter image description here

enter image description here

share|improve this question
    
Is there a reason you cant just do the processing for the Merge in the script? –  theJones May 15 '12 at 23:39
    
There are other processes running after this and I would like to get the list input process working as I have a need for it in other models as well. –  GeorgeC May 16 '12 at 10:26
    
Ah snap! That makes it harder. First guess looking at the screen shot is that ListFeatureClasses returns the "second half" of the fc. What I mean is that is knows the env setting and does not automatically join it. I would use the full workspace path in the python list. gis.stackexchange.com/questions/5893/… –  theJones May 16 '12 at 17:45
1  
Check out the section Advanced use of model iterators on this page. help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//… –  theJones May 17 '12 at 22:36
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.