I've just run into a similar problem with MoveLayer (10.1 SP1) - getting the error message 'Did not find reference layer.' It may only occur after something new is added to the TOC. I'm not sure what gismarty meant by his solution of "re-defining the layer list"? From the interactive window, I tested that the parameters point to layer objects, but MoveLayer still can't seem to find the reference layer. >>> lastlyr <map layer u'masterLayer'> >>> lyr <map layer u'WSCOND_S'> >>> df <DataFrame object at 0x28565dd0[0x2857cea8]> >>> arcpy.mapping.MoveLayer(df, lastlyr, lyr, "AFTER") Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\arcgis\desktop10.1\arcpy\arcpy\utils.py", line 181, in fn_ return fn(*args, **kw) File "c:\arcgis\desktop10.1\arcpy\arcpy\mapping.py", line 1659, in MoveLayer assert refe_c is not None, 'Did not find reference layer.' AssertionError: Did not find reference layer. Thanks for any ideas - Sean
... View more