Hello,I am trying to give features labels with python code.Here is the code I am using:>>> import arcpy
... mxd = arcpy.mapping.MapDocument("CURRENT")
... layer = arcpy.mapping.ListLayers(mxd, "")[0]
... if layer.supports("LABELCLASSES"):
... for lblclass in layer.labelClasses:
... lblclass.showClassLabels = True
... lblclass.expression = "[type]"
... layer.showLabels = True
... arcpy.RefreshActiveView()
...
and I get this error:Runtime error <type 'exceptions.NameError'>: name 'lblclass' is not definedI thought this worked once, but not anymore..Do I have to define "lblclass"??If you could give me some help, I'd really appreciate it, thanks!