label polygons using arcpy

Discussion created by jhchan69 on Jan 13, 2012
Latest reply on Aug 15, 2014 by v-robcha
I'm trying to write a python script to automate some mapping. One of the tasks I haven't figured out is how to access a layer's label properties. I'd like to set the layer's label field. I want to make an expression (something like round([length_field],2) & " m"). And I want to set the font size and font color.

Does anyone know how to do this?

Someone sent me "UpdateLayer" as a potential solution. I tried it but it doesn't seem to work with labelling. I made up a dummy .lyr file and it successfully changed the symbology of my layer. But none of the label properties I set in the .lyr file seem to have been applied to my new layer.

(edit: my subject title is actually wrong. I'm trying to label a line feature... but I don't think that's going to change the methodology of how to do this... )