Legend dropping items

766
5
Jump to solution
07-05-2021 04:45 AM
anamanvil
New Contributor II

Hi All,

Is there a way to read this common warning on Layout Legend using arcpy?

anamanvil_0-1625485320824.png

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

 

 

0 Kudos
1 Solution

Accepted Solutions
JeffBarrette
Esri Regular Contributor

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

View solution in original post

0 Kudos
5 Replies
DanPatterson
MVP Esteemed Contributor

I don't see anything in arcpy or arcpy's CIM

ArcGIS Pro Python reference—ArcGIS Pro | Documentation

Python CIM access—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
anamanvil
New Contributor II

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...

0 Kudos
DanPatterson
MVP Esteemed Contributor

Not everything in Pro is exposed to python or other coding access


... sort of retired...
0 Kudos
JeffBarrette
Esri Regular Contributor

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

0 Kudos
anamanvil
New Contributor II

Nice to hear we we'll have this functionality soon.

0 Kudos