I have created 3 models in mobelbuilder to accomplish one task. However I would like to do away with the 3 separate models and just combine all into one model. The problem I am having is I can't get the second part of the model to work unless I add the shapefile I edited in the first part of the model back into the map. The message it is giving me is 'All inputs are not current'. I am trying to use the Select Layer by Attribute tool.
How can I keep all inputs current so the model doesn't quit after the first step?
Yes I have preconditions set to the last variable in the first step.
I think the reason the model stops is because the first step takes the shapefile out the map while it is running and the second step won't start unless the shapefile is in the map.
I am trying to get the model to run through each step on its own without me having to babysit it and put the layer back in the map after each step
What I have done when models get complicated is to export them as Python scripts. you may be able to export all three of yours to python. You should be able to go to the script for the third tool and specify in the variables the exact location of the shape file.
I just tried a variation. I added calculate field to the model. double clicked the calculate field and made what I wanted. I closed it and it added the Feature Class to the model.
then I used the ADD DATA button to manually add the feature class back into the model. Did a second function and used the inner model link to the recalled feature class.
This seems to work. but my model was exceptionally basic
I renamed the second instance of the feature as AddressPointsAgain
This is what it did in python. It calls the same feature twice but calls them different things in the script. It then performs the Process's in the order they are in Python. I am far from an expert in Python this is just an export from Model Builder
# Import arcpy module
# Local variables:
AddressPointsAgain = "Database Connections\\PROD_GIS.sde\\GIS.AddressPoints\\GIS.AddressPoints"
GIS_AddressPoints__4_ = AddressPointsAgain
GIS_AddressPoints__2_ = "Database Connections\\PROD_GIS.sde\\GIS.AddressPoints\\GIS.AddressPoints"
GIS_AddressPoints__3_ = GIS_AddressPoints__2_
# Process: Calculate Field
arcpy.CalculateField_management(GIS_AddressPoints__2_, "LOCATION", "2", "VB", "")
# Process: Add Field
arcpy.AddField_management(AddressPointsAgain, "TEStField", "LONG", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")