Reorder legend items with arcpy.mapping

535
1
03-19-2014 01:45 PM
Status: Implemented
Labels (1)
ClintDow
Occasional Contributor

It would be nice to be able to reorder legend items using arcpy based on an index position within the legend. 

Currently there is no intuitive way to reorder legend items in arcpy. You can insert items in respect to a reference layer, with LegendElement.autoAdd = True but if the legend has been manually reordered you may get unexpected results. 

If each legend item had a corresponding index value and could be reordered based on its index, this would open up lots of possibilities for automating legend generation/updating, which I have had several requests for from members of our GIS Department. The current functions allows for some functionality they request but its not quite enough. 

1 Comment
KoryKramer
Status changed to: Implemented

Implemented in ArcGIS Pro 2.7.

See Ideas in ArcGIS Pro 2.7: Something to Celebrate 

Also check out what's new in ArcGIS Pro 2.7!