0

I am using ModelBuilder for ArcMap. I specify the names of my temp files like so:

%scratchworkspace2%\Ofst_B_%LetterId%_%Sea Level Rise Inches%.img

"LetterID" is a string parameter, "Sea Level Rise Inches" is a double, and "scratchworkspace2" is a folder.

When I run my model in batch mode these files are not stored with the correct name. The first file is saved correctly I think, but the subsequent runs it saves the temp value as "G:\temp\rastercalc1". It is not saving the temp file with the specified name. I have to manually delete this file from the temp directory.

Also, the "Sea Level Rise Inches" value is not incrementing with the batch file, so it is overwritten with each batch run.

I am doing a lot with the % symbols and I may need some help with that.

But at an earlier stage of my model, I use a similar naming convention and the files do save correctly and are not overwritten:

%Working Directory%\Depth_Rast_%LetterId%_%Sea Level Rise Inches%.img

But this does NOT work without being overwritten: %Working Directory%\BC_%LetterId%_%Sea Level Rise Inches%.shp

Below is my model:

enter image description here

1

1 Answer 1

2

Running a model in batch mode results in the model run being a parallel, rather than a serial process. It might run properly once, but you'll get garbage output or errors for everything else.

Get your model to work properly for one run, then slap an iterator in there. Iterate Rasters, perhaps? Though, if everything is based off the LetterID, then Iterate Field Values on a table or shapefile of some sort with the LetterID's as the field would likely be better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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