0

I am creating a model that finds all the tracks(points) a wolf pack leaves who cross into a park using select by location, easy. I than want to find all the tracks(points) those same wolfs made on those same trips before and after leaving the park. The problem I am having is after the first feature class is successfully processed it stops iterating through one side of the join.

Exe

cuting (Iterate Feature Classes): IterateFeatureClasses "C:\Modelbuilder\Wolf.gdb" Puppy* POINT NOT_RECURSIVE
Start Time: Thu Jan 25 15:32:11 2018
Succeeded at Thu Jan 25 15:32:14 2018 (Elapsed Time: 2.56 seconds)
Executing (Make Feature Layer): MakeFeatureLayer "C:\Modelbuilder\Wolf.gdb\Puppy_08_13_16_17" Puppy_08_13_16_17_Layer # "C:\Modelbuilder\Wolf.gdb" "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;Groupie Groupie VISIBLE NONE;sm_group sm_group VISIBLE NONE;dt dt VISIBLE NONE;lat lat VISIBLE NONE;long long VISIBLE NONE;LG_num LG_num VISIBLE NONE;SM_num SM_num VISIBLE NONE"
Start Time: Thu Jan 25 15:32:14 2018
Succeeded at Thu Jan 25 15:32:14 2018 (Elapsed Time: 0.23 seconds)
Executing (Select Layer By Location): SelectLayerByLocation Puppy_08_13_16_17_Layer WITHIN Park # NEW_SELECTION NOT_INVERT
Start Time: Thu Jan 25 15:32:14 2018
Succeeded at Thu Jan 25 15:33:38 2018 (Elapsed Time: 1 minutes 23 seconds)
Executing (Summary Statistics): Statistics Puppy_08_13_16_17_Layer "C:\Modelbuilder\Wolf.gdb\Puppy_08_13_16_17_stat" "Groupie FIRST" Groupie
Start Time: Thu Jan 25 15:33:38 2018
Succeeded at Thu Jan 25 15:34:25 2018 (Elapsed Time: 46.73 seconds)
Executing (Add Join): AddJoin Puppy_08_13_16_17_Layer Groupie "C:\Modelbuilder\Wolf.gdb\Puppy_08_13_16_17_stat" Groupie KEEP_COMMON
Start Time: Thu Jan 25 15:34:25 2018
Succeeded at Thu Jan 25 15:34:25 2018 (Elapsed Time: 0.17 seconds)
Executing (Save To Layer File): SaveToLayerFile Puppy_08_13_16_17_Layer "C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr" # CURRENT
Start Time: Thu Jan 25 15:34:25 2018
Succeeded at Thu Jan 25 15:34:25 2018 (Elapsed Time: 0.11 seconds)
Executing (Feature Class to Feature Class): FeatureClassToFeatureClass "C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr" "C:\Modelbuilder\Wolf.gdb" zPuppy_08_13_16_17_cross_park # "Puppy_08_13_16_17_Groupie "Groupie" true true false 4 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17.Groupie,-1,-1;Puppy_08_13_16_17_sm_group "sm_group" true true false 4 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17.sm_group,-1,-1;Puppy_08_13_16_17_dt "dt" true true false 8000 Text 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17.dt,-1,-1;Puppy_08_13_16_17_lat "lat" true true false 8 Double 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17.lat,-1,-1;Puppy_08_13_16_17_long "long" true true false 8 Double 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17.long,-1,-1;Puppy_08_13_16_17_LG_num "LG_num" true true false 8 Double 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17.LG_num,-1,-1;Puppy_08_13_16_17_SM_num "SM_num" true true false 8 Double 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17.SM_num,-1,-1;F_Name__stat_Groupie "Groupie" true true false 4 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17_stat.Groupie,-1,-1;F_Name__stat_FREQUENCY "F_Name__stat_FREQUENCY" true true false 0 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17_stat.FREQUENCY,-1,-1;F_Name__stat_FIRST_Groupie "FIRST_Groupie" true true false 4 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_13_16_17_Layerfile.lyr,Puppy_08_13_16_17_stat.FIRST_Groupie,-1,-1" #
Start Time: Thu Jan 25 15:34:26 2018
Succeeded at Thu Jan 25 15:36:16 2018 (Elapsed Time: 1 minutes 50 seconds)
Executing (Iterate Feature Classes): IterateFeatureClasses "C:\Modelbuilder\Wolf.gdb" Puppy* POINT NOT_RECURSIVE
Start Time: Thu Jan 25 15:36:16 2018
Succeeded at Thu Jan 25 15:36:16 2018 (Elapsed Time: 0.20 seconds)
Executing (Make Feature Layer): MakeFeatureLayer "C:\Modelbuilder\Wolf.gdb\Puppy_08_10_12_17" Puppy_08_10_12_17_Layer # "C:\Modelbuilder\Wolf.gdb" "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;Groupie Groupie VISIBLE NONE;sm_group sm_group VISIBLE NONE;dt dt VISIBLE NONE;lat lat VISIBLE NONE;long long VISIBLE NONE;LG_num LG_num VISIBLE NONE;SM_num SM_num VISIBLE NONE"
Start Time: Thu Jan 25 15:36:16 2018
Succeeded at Thu Jan 25 15:36:17 2018 (Elapsed Time: 0.25 seconds)
Executing (Select Layer By Location): SelectLayerByLocation Puppy_08_10_12_17_Layer WITHIN Park # NEW_SELECTION NOT_INVERT
Start Time: Thu Jan 25 15:36:17 2018
Succeeded at Thu Jan 25 15:36:57 2018 (Elapsed Time: 40.65 seconds)
Executing (Summary Statistics): Statistics Puppy_08_10_12_17_Layer "C:\Modelbuilder\Wolf.gdb\Puppy_08_10_12_17_stat" "Groupie FIRST" Groupie
Start Time: Thu Jan 25 15:36:57 2018
Succeeded at Thu Jan 25 15:37:20 2018 (Elapsed Time: 22.93 seconds)
Executing (Add Join): AddJoin Puppy_08_10_12_17_Layer Groupie "C:\Modelbuilder\Wolf.gdb\Puppy_08_10_12_17_stat" Groupie KEEP_COMMON
Start Time: Thu Jan 25 15:37:21 2018
Succeeded at Thu Jan 25 15:37:21 2018 (Elapsed Time: 0.16 seconds)
Executing (Save To Layer File): SaveToLayerFile Puppy_08_10_12_17_Layer "C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr" # CURRENT
Start Time: Thu Jan 25 15:37:21 2018
Succeeded at Thu Jan 25 15:37:21 2018 (Elapsed Time: 0.09 seconds)
Executing (Feature Class to Feature Class): FeatureClassToFeatureClass "C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr" "C:\Modelbuilder\Wolf.gdb" zPuppy_08_10_12_17_cross_park # "Puppy_08_13_16_17_Groupie "Groupie" true true false 4 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_13_16_17.Groupie,-1,-1;Puppy_08_13_16_17_sm_group "sm_group" true true false 4 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_13_16_17.sm_group,-1,-1;Puppy_08_13_16_17_dt "dt" true true false 8000 Text 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_13_16_17.dt,-1,-1;Puppy_08_13_16_17_lat "lat" true true false 8 Double 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_13_16_17.lat,-1,-1;Puppy_08_13_16_17_long "long" true true false 8 Double 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_13_16_17.long,-1,-1;Puppy_08_13_16_17_LG_num "LG_num" true true false 8 Double 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_13_16_17.LG_num,-1,-1;Puppy_08_13_16_17_SM_num "SM_num" true true false 8 Double 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_13_16_17.SM_num,-1,-1;F_Name__stat_Groupie "Groupie" true true false 4 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_10_12_17_stat.Groupie,-1,-1;F_Name__stat_FREQUENCY "F_Name__stat_FREQUENCY" true true false 0 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_10_12_17_stat.FREQUENCY,-1,-1;F_Name__stat_FIRST_Groupie "FIRST_Groupie" true true false 4 Long 0 0 ,First,#,C:\Modelbuilder\Puppy_08_10_12_17_Layerfile.lyr,Puppy_08_10_12_17_stat.FIRST_Groupie,-1,-1" #
Start Time: Thu Jan 25 15:37:21 2018

enter image description here

  • 1
    Have you tried adding a Remove Join? – BERA Jan 26 '18 at 6:23
1

Try making the last step in your model a Remove Join as @BERA suggested. If that doesn't work on it's own, try putting everything after Make Feature Layer into a submodel with the feature layer as a parameter of that submodel. That should force ModelBuilder to reevaluate the feature layer with every iteration.

  • I have tried both suggestions with no luck. It appears to be a problem with the join. The join is permanently on the initial feature class and not on the iterated feature class. I tried %Name%.joinfield but it didn't like that. – Damned_Novice Jan 26 '18 at 15:48
  • Try putting everything inside the iterator in a submodel. That might trick it into dealing with the join properly. – P.T. Curran Jan 26 '18 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.