Hi All,
Is there a way to read this common warning on Layout Legend using arcpy?
Even though I adjust the font to fit all legend items; there are instances where not all legend items can fit within the legend placeholder. As the generation of these PDFs is automated using arcpy I am wondering if there is a way to read this warning and output an error so that the user can modify it manually when necessary.
Thanks,
Ana
Solved! Go to Solution.
In arcpy.mapping (ArcMap) we had a Legend.isOverFlowing property. We have plans to add this to Pro as well. Hopefully in 2.9 or the next release.
Jeff - arcpy.mp and Layout Teams
I don't see anything in arcpy or arcpy's CIM
ArcGIS Pro Python reference—ArcGIS Pro | Documentation
Python CIM access—ArcGIS Pro | Documentation
Me neither...
I tried iterating through layer items within the map and comparing it to legend items to see if there was a discrepancy when a specific item is not physically appearing within the legend placeholder; but it seems that even though the legend item is not shown, it is still part of the legend item list.
So it seems just not possible to highlight this scenario with Python...
Not everything in Pro is exposed to python or other coding access
In arcpy.mapping (ArcMap) we had a Legend.isOverFlowing property. We have plans to add this to Pro as well. Hopefully in 2.9 or the next release.
Jeff - arcpy.mp and Layout Teams
Nice to hear we we'll have this functionality soon.