I am teaching a class of about 30 students and working in ModelBuilder. I am running into a problem and not sure if it is a 10.5 bug or if I am doing something wrong.

I am having students run models in batch mode: Batched

For this simple model (I have used both %n% and %i% with the same outcome) Model

For half of the class it works fine, for the other half of the class arc writes out the following (outputs are highlighted):


This behaviour (and the fact it works fine for 1/2 of the students) is boggling my mind. Why would it ever insert %name% if a name variable doesn't exist? Is there a setting controlling how %i% %n% works? What am I missing?

  • 3
    I do not know why it is not working as expected consistently, but that said, I have regularly had a variety of issues using Batch geoprocessing with model builder. In my experience, it is generally safer to use iterators in model builder than to use batch geoprocessing (if that is compatible with your workflow). – John Sep 20 '18 at 21:04

I was able to replicate the same problem in ArcMap 10.6, it seems to be a bug, hopefully ESRI will pick up on this thread. Interestingly on the second layer it wrote the incorrectly named buffer dataset to the default geodatabase instead of my specified one...

But there was a solution to this problem:

  1. Set the workspace Environment setting at the model level. So in model builder go to Model > Model Properties > Environments > Tick on Workspace so current and scratch are ticked > Click on Values > Expand workspace > Set both to be the output file geodatabase > OK everything
  2. Open buffer tool in ModelBuilder and for the Output Feature Class parameter type buff1m_%n%_%i%.
  3. When you click out of that parameter note it has picked up on the workspace you set in the environment settings.
  4. Run the model in batch mode seems to work as expected for me.

This also helps you teach your students about the hierarchical nature and inheritance of environment settings in ModelBuilder.

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.