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 <SPAN class="n">legend</SPAN> <SPAN class="o">=</SPAN> <SPAN class="n">arcpy</SPAN><SPAN class="o">.</SPAN><SPAN class="n">mapping</SPAN><SPAN class="o">.</SPAN><SPAN class="n">ListLayoutElements</SPAN><SPAN class="p">(</SPAN><SPAN class="n">mxd</SPAN><SPAN class="p">,</SPAN> <SPAN class="s">"LEGEND_ELEMENT"</SPAN><SPAN class="p">)[</SPAN><SPAN class="mi">0</SPAN><SPAN class="p">] 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.</SPAN>
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.