Hi! I want to create a script tool that will start the label for certain layers, that is to add the parameters with the layer to which I want to activate the label and what field I want to display it that I need.. I used this script
mxd = arcpy.mapping.MapDocument("CURRENT")
layer = arcpy.mapping.ListLayers(mxd, "")
for lblclass in layer.labelClasses:
lblclass.showClassLabels = True
lblclass.expression = " [Layer]"
layer.showLabels = True
but it doesn't work to create a script tool, it only works in python windows. Do you have any suggestions?