MoveLayer not working in 10.1?

1594
3
01-11-2013 03:43 PM
JuanOrozco
Occasional Contributor
Am I imagining things or MoveLayer does not work in 10.1? I have the exact same code moving a layer in the TOC in 10.0 and it works fine, but in 10.1 I get an error saying ???assert move_c is not None, ???Did not find move layer.??? AssertionError: Did not find move layer.???
Has anyone seen this before?
Tags (2)
0 Kudos
3 Replies
JeffBarrette
Esri Regular Contributor
I can not reproduce.  What types of layer are you trying to move?  What is your reference layer type.  Are you working with elements in a group layer.

Jeff
0 Kudos
JuanOrozco
Occasional Contributor
Jeff,

I'm moving a layer that's added at the bottom of my TOC (the layer is not part of any group. This is a stand alone script, ), and it runs fine in a machine running 10.0.

I'll keep debugging, i just wanted to know if anyone else had the same problem.

Thanks a lot for the response.
0 Kudos
JuanOrozco
Occasional Contributor
Weird, I solved this by setting my move layer to a feature class from my table of contents. In 10.0 I was setting it with arcpy.mapping.Layer(path).
0 Kudos