In the Python arcpy.mp module, the LegendElement class (LegendElement—ArcGIS Pro | Documentation ) states that the mapFrame property is read/write but I am getting a value error when trying to assign it a map frame object. My end goal is to try to swap the map a given legend is referencing. Am I doing something wrong or is this a bug?
Issue resolved, not sure what was going on in my attached image RE the type error given that m: MapFrame and legend: Legend. Re-tried this in a fresh session today though and things worked as intended. May have just gotten variables mixed up in the Python console.