How do I get a layer´s label from the TOC?
I can´t find a similar question and ArcGIS Help tells nothing about it. I have searched even in other knowledge bases but with no success.
Getting a layer´s name is easy but getting its label that appears in the TOC not.
mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd) for lyr in arcpy.mapping.ListLayers(mxd, data_frame=df): layer_name = lyr.name layer_label = ???? # there is nothing like lyr.label