Sort the TOC in ArcMap alphabetically

I wanted to quickly create a kmz for a client which contained all of their asset data. It didn’t need to be in any order, but then I thought, why not alphabetical?

After trying out a few different ways, I decided to use an empty group layer as the anchor layer for sorting. One cannot add a group layer to the table of contents via Python, so unfortunately that step is a manual exercise.

This still beats manually moving dozens of layers up and down though 🙂

Advertisements