I had exactly the same problem and I understand your frustration. You may already solved the problem, but I thought answering the question may help some people who encountered the same problem.
You don't have to deal with any of the Representation legend object to access legend component of Representation layer. The below code may contain typos so please be careful if you are trying to copy and past.
import arcpy mxd_path = "path to your mxd file" mxd = arcpy.mapping.MapDocument(mxd_path) legend = arcpy.mapping.ListLayoutElements(mxd, "LEGEND_ELEMENT")[0] for lyr in legend.listLegendItemLayers(): legend.updateItem(lyr, use_visible_extent = True) mxd.save() del mxd
I hope this helps.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.