arcpro 2.5
change layer visibility in python script with aprx closed....
print layout pdf
does not honor the changes to layer visibility in the legend
turn on a second layer
layer is on in the map
legend shows original legend does not update.
Dont know how to refresh...
So map updates, titles will update, but legend does not....
Not sure if you ever found a solution to this elsewhere - I just posted my work around here: https://community.esri.com/t5/python-questions/legend-not-updated-in-exported-layout-arcpy-mp/td-p/3....