arcpy.mp update LegendElement's map frame

281
2
09-11-2020 12:24 PM
CM1
by
New Contributor II

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?

Example:

Thank you.

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

can you show the relevant code?


... sort of retired...
0 Kudos
CM1
by
New Contributor II

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.

0 Kudos