I am attempting to add a new MapFrame to an existing Layout Object in an ArcGIS Pro Project;
import arcpy
aprx = arcpy.mp.ArcGISProject("CURRENT")
layout = aprx.listLayouts("LayoutOne")[0]
layout_cim = layout.getDefinition("V2")
new_mapframe = arcpy.cim.CreateCIMObjectFromClassName("CIMMapFrame", "V2")
layout_cim.mapFrame = new_mapframe
layout.mapFramename = "Map"
layout.setDefinition(layout_cim)
When this code is executed, I see a "flash" in the Layout Tab, but no new MapFrame.
I have also tried omitting the line layout.mapFramename = "Map"
, the same thing happened.