Select to view content in your preferred language

running the batch on a model isn't working

3922
15
10-18-2012 06:03 AM
KieranGibson
Emerging Contributor
I have a model that I created and it does not contain any iterators. When I try and run a batch the model only runs for the first row or processes in the batch table. This has happened to me before. Is there something that I can do to make sure that all the processes are run?
0 Kudos
15 Replies
KieranGibson
Emerging Contributor
Dear Wayne,


Yes that is correct, my model will not run the 2nd iteration, do you think it is due to the inline variable substituion? I also have the second process writing to a serperate catalog in a seperate mdb.

I am confused at the term 'walk' you are using, is that something I should be using?

Also You said that you set your batch to run twice, does that mean you just put two counties into the batch window like the image I attached?
0 Kudos
T__WayneWhitley
Honored Contributor
Yes to your last question - 2 iterations = 2 runs as you illustrated.
When I say 'walk', I simply mean the tool can 'drill down' from the root location to load from subdirectories -- probably you're already aware of this option and all this means is if you have a root for a county already set up for input raster datasets, but they're grouped into subfolders by sections of some sort, the 'from workspace' tool has a box to check on (include Sub-directories), and simply goes through each contained subfolder from the root to 'collect' the datasets and load them all.  Very convenient.

I discovered why I have 2 params showing up in batch mode instead of the 3 I was aiming for - the param I attempted to set is 'derived' -- I'll attach another pic to show you what I should have done.  And from this point, if at least the batch mode is proven adequate (I think so), then I guess you'll want to work on the 'inline text sub'.  Not sure if this'll work in ModelBuilder in the way you intend, but there's always a workaround!

[ATTACH=CONFIG]18560[/ATTACH]
0 Kudos
T__WayneWhitley
Honored Contributor
I'm sending you the test toolbox to try, produced in 10.
Try it in batch mode to see if at least this is on the right track before fiddling around with inline text... OK?

Forgot to check off the managed mode on type - see the Create Raster Catalog tool inside the model, and for testing purposes change this to 'unmanaged' so at least you'll have a quicker run! 🙂
0 Kudos
KieranGibson
Emerging Contributor
Wayne,
Thank you so much for all of your help and time you have been putting into this. I am going to continue to look at this and may have to try something other than inline variable substitution. In the mean time it is 5:30 here and I have somewhere I have to be. Again I really appreciate your help, I will be able to access this work again on Monday and will post something to the thread if I figure anything out or have any more questions. I am looking forward to trying the test toolbox you have sent and hope I can get it to work on Monday. Again, I hate to run off like this and really appreciate your help. Have a wonderful weekend!

Sincerely,
Kieran Gibson:D
0 Kudos
T__WayneWhitley
Honored Contributor
Ahh, no worries.

And just to report back before I too must leave, it's highly likely you will have to use some 'model only' tools to get your inline var sub to work, like 'parse path' (I think it is called) .... anyway, for me this is easier via Python, and in fact it appears on 1st glance at the documentation you'll be using Python snippets to get the job done.  So I'm interested now to see how ModelBuilder accommodates in order to get the job done.

These tools can be accessed (at 10 and 10.1) within the ModelBuilder window, using right-click.  Good docs here and I'll test/post back here later - calculate value looks to be a powerful tool to use, esp if proficient at building functions:
http://resources.arcgis.com/en/help/main/10.1/index.html#/Parse_Path/004000000008000000/
http://resources.arcgis.com/en/help/main/10.1/index.html#/Calculate_Value/004000000004000000/
0 Kudos
KieranGibson
Emerging Contributor
Good Afternoon Wayne,

I was able to get the batch working without using the inline var sub. I will continue to look at the links you posted and solve it using the model only tools or maybe even some python. I hope you have a wonderful day and thank you for your help.
0 Kudos