Select to view content in your preferred language

Model Builder Tool Changes Input Layers

3506
20
10-14-2021 05:28 AM
LukeGilner1
Frequent Contributor

I keep having an intermittent issue with several different models.  When I run them from the toolbox, one or more of the original input layers will randomly change to a different layer.  This mostly happens when I reopen my project the next day, but not always.  Sometimes the underlying layer within the model properties changes, sometimes is does not, but the labels always stay correct.

I found that when I open the tool from the toolbox and before running it in the geoprocessing pane, if I  switch to a Layout and then back to the Map view, the tool refreshes and often changes back to the correct layer.

The input layers are hosted feature services and I have them set as parameters.  I'm using Pro 2.8.3.

Am I doing something wrong, or is this a bug, or just a refresh issue?  PLEASE HELP

See the picture below.  The top two parameters are my input layers.  You can see that the first one changed to a different layer in the dropdown.  But the correct layer is shown in the model, and when I open the tool properties everything is correct this time (sometimes it changes though).

LukeGilner1_0-1634213747573.png

 

 

20 Replies
DianaHenderson1
Occasional Contributor

Sorry, don't have an answer for you, I just want to echo, that the same frustrating thing is happening to me:(

0 Kudos
LukeGilner1
Frequent Contributor

Thanks!  At least I'm not the only one.  I was finding that even though the layer changed in the parameters, when I export the model to python, the layers were correct.  Seems like there's a little glitch in there on the model builder side of things.  In most cases, my parameters didn't need to change anyway, so I just ended up removing the parameters to run the tools.

0 Kudos
DianaHenderson1
Occasional Contributor

I am testing out a theory, I was initially using shapefiles for some of my inputs, and I have now converted those inputs into a feature class. I haven't completely tested this, and so far it is promising. I saw something in a blog that prompted me to try it.

0 Kudos
LukeGilner1
Frequent Contributor

I was using feature services.  Let me know what you find out.  It seemed like most of the time the problem would happen after I added or removed layers from my contents.

by Anonymous User
Not applicable

Did you ever figure out what was causing the inputs to shift? I'm experiencing the same issue.

0 Kudos
LukeGilner1
Frequent Contributor

Nope.  Most of the time it seems adding/removing layers to the map is the culprit, but not always.  In model builder, when you hover over the tool it appears to show the correct layers, but when you open the tool it doesn't show the correct layers.  I always run my models through the toolbox.  If the layers are set as parameters in the tool, I just change it to the correct layers and the models runs correctly as it's supposed to.  Or just remove the parameters and the model appears to run correctly as well.  Hope this helps.

0 Kudos
DianaHenderson1
Occasional Contributor

The best I can provide, since Luke highlights what seems to occur on my end as well; I navigate to the file rather than just select from the dropdown list. This appears to have alleviated most of the issues, and I haven't been able to test the full process yet.

0 Kudos
by Anonymous User
Not applicable

Thanks for the response! That workaround sounds pretty similar to what I've been doing as well. I also thought it had something to do with add/removing layers, but that turned out not to be the case. 

0 Kudos
MajaJensen
New Contributor

I'm having the same issue. For me it doesn't matter wether the inputs are shapefiles or feature classes, and it doesn't matter wether I drag and drop them from the map, select them from the drop down-list or if navigate to their location on the server. Very frustrating!

0 Kudos