Why does a model that works in ArcMap10.3 not work correctly in 10.6?

2739
20
Jump to solution
04-22-2018 03:27 PM
CherylTrine
Occasional Contributor II

I recently replaced ArcMap 10.3.1 on my computer with ArcMap 10.6.  I created a model years ago, probably in 10.3.1, that iterates through shapefiles in a folder, changes the name of the shapefile by appending a date onto it, and then iterates through the features in the shapefile to insert that name into a field.  This model has been saved on our network so multiple computers have access to it.  Today, I tried to use the model in Arcmap 10.6.  The tool runs and gives no error, but when the process is done the shapefiles are gone, although the new names appear in ArcCatalog!  I thought somehow the tool might have gotten broken, so I tried it on another computer that is still at 10.3.1.  The tool ran perfectly.  I tried restarting my computer that has 10.6, but the tool still didn't work. I've looked, but I haven't seen anything about having to update tools to make them usable for 10.6?  Have I missed something? How do I get this to work?

Thanks,

Cheryl

20 Replies
CherylTrine
Occasional Contributor II

It uses one of the iterator tools, so not export friendly.  I have thought, though, that I might dust off my Python and see about making a script.  I do enjoy programming, but don't generally have much time for it.

I'll wait and see what Tech Support has to say.

0 Kudos
DanPatterson_Retired
MVP Emeritus

trust me... an iterator can be replicate using 'for' or 'while' loops

0 Kudos
DanPatterson_Retired
MVP Emeritus

Each toolbox has a toolbox history... which will record changes.

For example the Data Management toolbox history... you will have to examine the toolbox of the tools that you use in your model to see if anything has changed.  Esri does indicate that they try to maintain backward compatibility but you never know

0 Kudos
curtvprice
MVP Esteemed Contributor

Have you found out anything?

Wondering if some validation (filename checking) has changed at 10.6 that is causing your issue...

CherylTrine
Occasional Contributor II

I'm working with Tech Support now.  He said it works correctly on everything up to 10.5.  After he played around with it for a bit, he sent me a copy of what he thought worked.  I tried it under his watchful eye, and sure enough, it didn't work!  I am guessing he hadn't tried it on 10.6.  At any rate, he is suspecting it might be a new bug which may be associated with one of the tools I'm using.  He is exploring it more, and will get back to me. I'll post again when I know what is up.

What I find interesting is that it worked fine from the ModelBuilder window in 10.6.  In the meantime, I'll use the 10.3 machine to do the work I need this tool for.  And, if it is a bug and no simple work around, I'll be forced to take some time and write it in Python!  (Yay! I've been looking for an excuse to do some "programming"! )

Cheryl

DuncanHornby
MVP Notable Contributor

Just to wade in here a colleague of mine upgraded to 10.6 and his models from an earlier version failed as well, so like you I think there is some incompatibility issue, which does not surprise me as this seems to happen with every major release of ArcMap...

A solution which I don't think you have tried is to simply rebuild your model from scratch in 10.6? If you have only a few tools in the model this is not an onerous task, annoying yes but quite achievable. Or as Dan Patterson has hinted move it all out into a python script.

CherylTrine
Occasional Contributor II

Tech Support was able to replicate the problem on their end, so they have logged a bug described as:

BUG-000114045 : When using the Model Iterator to iterate through feature classes to rename them, the first feature class is deleted after running the model as a tool.

I'm not certain that is quite the right description because if I leave off the last half of my model; the first half, which uses the iterator, runs fine.  Anyhow, I don't have time to do more testing . . .

They said a "workaround" is to use ArcGIS Pro--apparently it works properly there.

Cheryl

curtvprice
MVP Esteemed Contributor

Cheryl, another thought: you may want to consider modifying your workflow. This is actually best practice in geoprocessing tool development (when practical), as any tool that modifies its input 'in-place' is risky because if anything happens during processing (power outage, disk full, user cancel, ghosts in the machine) your data is left in an incomplete state.  In my experience this advice especially applies to ModelBuilder which just because of the way it is set up may sometimes compromise stability in its quest to be easy to use. Simpler is definitely better in Model Builder!

Even when working with Python tools, when I have a big complicated process that modifies a workspace in-place, I have set up scripts to copy the data (to a local location, for speed), do a bunch of processing, and only at the end (when we know everything has successfully executed) replace the input with the results. This is still risky, but a little less so.

0 Kudos
CherylTrine
Occasional Contributor II

Curtis, you make a good point.  In this case, however, it's not much of an issue because the folder contains only a copy of data that has just been imported and no other work has been done on it.  If the process were to fail, it's a simple matter to re-import the data.  As I rewrite the tool, I will keep your comments in mind, because anyone who comes along after me and uses the tool may not know what they need to do if the tool fails, or they may fail to check that the tool did everything right.

deleted-user-miDSV-lAm0B-
New Contributor II

You might verify that the resulting datasets haven't been marked as "Intermediate" data by the model.  If it is then my experience is that they will remain when the model is run from within the model but will be deleted when run using the parameters window.  I think this was a feature added sometime in 10.3 or later.  Right-click the resulting table, shape file, or feature class object within the model and look for the check near the top of the context menu....just a thought.