I create various layers programmatically using ArcPy.
I can adjust how the layers are sequenced using the
However, I want to have the legend reflect a different order. I have yet to figure out how to do this in Python.
I have tried using
legend.autoAdd=True or False. I think I am close in using:
legend=arcpy.mapping.ListLayoutElements(mxd,"LEGEND_ELEMENT","My Legend") 
and then legend.items.something.
I have four legend items A, B, C, and D which appear incorrectly as D, C, A, B.
Can anyone provde a link to code examples or better documentation?
This question was originally posed for ArcGIS 10.0 but another question (Moving legend items up and down with arcpy) using ArcGIS 10.2 has been merged into it so answers using any version from and including 10.0 should be acceptable.