Issua batching a model built in "model builder"

2212
10
09-22-2011 11:51 AM
SebastianSantibanez
New Contributor
Hi,
I have a model that selects iteratively elements from a point dataset and calculates a cost distance for each of these points.  It works fine when I run it for just one dataset, but when I try to batch it I get the following error.


ERROR 000865: Input raster or feature source data: I_atlanta_OBJECTID does not exist.
ERROR 000581: Invalid parameters.

0 Kudos
10 Replies
TimothyHales
Esri Notable Contributor
Instead of using the Batch Mode, try creating a new model using the iterators and then add (nest) your existing Cost Distance model into that model.
0 Kudos
ShitijMehta
Esri Regular Contributor
try not to mix iteration and batch together.
0 Kudos
SebastianSantibanez
New Contributor
I am making progress with this model.

The objective of the model is to calculate a cost distance to point features (1 cost distance raster for each point) in different datasets

this is the model



The problem is that the model is iterating the whole "Iterate feature class" process first and then passing to the next stage.  and therefore is only calculating the cost distances for the last feature class.  What should I do for getting the model to run 1 iteration in the "Iterate feature class" and passing to the next stage? 

Please any Idea or suggestion?
0 Kudos
TimothyHales
Esri Notable Contributor
I would do the opposite of what you have done.  I would place the Iterate Selection and Cost Distance model into the other model with the Iterate Feature Class tool.
0 Kudos
SebastianSantibanez
New Contributor
I would do the opposite of what you have done.  I would place the Iterate Selection and Cost Distance model into the other model with the Iterate Feature Class tool.


Dear Thales,

I tried your suggestion and I got this error:

ERROR 000732: Input raster or feature source data: Dataset I_atlanta_OBJECTID does not exist or is not supported

This is the model



The problem seems to be that from a nested model, the variable "atlanta" becomes I_atlanta_OBJECTID when I called from a submodel as you suggested.  I tried copying the selected feature to a new dataset before of calculating the distances, but I get the same error.  Evenmore, this is exactly the same error I get when I try to run the model in batch mode.  Is this a known issue in arcgis?  Please any advice?
0 Kudos
ShitijMehta
Esri Regular Contributor
I would suggest using a Python script to do this double looping.
0 Kudos
SebastianSantibanez
New Contributor
I would suggest using a Python script to do this double looping.


Could you please explain why you are suggesting a Python Script?
0 Kudos
ShitijMehta
Esri Regular Contributor
See attached image.

Try that.

Hopefully this is what you want to do.
0 Kudos
SebastianSantibanez
New Contributor
Thank you shitijmehta. 
It works, however it does the job for n-1 records only (it skips the last record).  Do you have only 9 records in your FCs?
0 Kudos