Working on a Python script that does some routine table management of a couple of feature classes. In one step I define a table join and then export that to a GDB. When that runs, it will add it to the Geodatabase and also add the new Feature Class as a layer to the table of contents. It always adds to the top of the Table of Contents, but I need it to be added to the bottom as the last item.
The problem that I am running into is that in my code, I define several local variables using an index from the Table of Contents like old_sites = mapx.listLayers()[3]
If I have this hardcoded and a new layer is added to the top, this layer is no longer indexed at position 3, it's now 4, but the code won't know that.
Is there a way to change the default add position to the bottom?