I've got a style file which I'm trying to apply to a feature class and create a .lyr file from it. There are multiple fields in the feature class which the style can be applied to. I just can't quite work out how to do this using python though.
Most example like the one on this page: ArcGIS Help 10.1 mentions using
legend = arcpy.mapping.ListLayoutElements(mxd, "LEGEND_ELEMENT") then using that object to modify the layer. But when I try that it doesn't find any legend elements. Even if it did, none of the examples mention how to apply it to a specific field.
I also tried using an existing .lyr file with the same style applied then using ApplySymbologyFromLayer to copy it over. That works, but I can't modify the symbology to change the field it has been applied to.