Has anyone encountered, or aware of, a limit to the number of elements in an ArcGIS Pro layout that is manipulated by ArcPy?
The reason I ask is that I have created an ArcGIS Pro 1.4.1 project that has one layout and six map frames that I have been happily running a large ArcPy script against that finishes by exporting to PDF and then saving a copy of the project.
As part of the code I incorporate writing a table that incorporates cloning hundreds of text and graphics elements, and this is based on TextElement example 2 from the ArcGIS Pro documentation which:
constructs a graphic table based on data values from a table in a map. The layout was authored with a vertical line named vertLine, a horizontal line named horzLine, and a text element named cellText. Each of the elements were authored with the appropriate symbology and text properties. The element's anchors were also set to the upper left position, and the text element's vertical and horizontal justification were set to upper left.
That works fine but when I add more code to implement a workaround that I am developing for measured grids (because they are not supported until ArcGIS Pro 2.x) that also creates about a hundred text elements, this new set of text elements do not appear in the exported PDF or the project saved as a copy, but using
As soon as I comment out the TextElement example 2 code, the measured grid text elements start to appear in both the exported PDF and the project saved as a copy. This leads me to theorize that I have encountered a limit to how many layout elements ArcGIS Pro can support when one of its projects is manipulated by ArcGIS Pro.
I have not yet included a code snippet here, in case someone already has one that they can offer, but I believe I will be able to run up a code snippet that illustrates this.