What the cases where you need to clone LayoutListElements such as text elements, map surround elements, and graphic elements?
I am currently working on a one-page map document that I only need to print a one-page pdf by exporting a web map to pdf.
Here is a picture of the layout. The example that I am following in option 2 looks like it is generating a map and followed by a table. Printing Popup Example Blog from ESRI
I don't need to generate a table. I just need to print text some dynamic text elements and a mapsurround element. In addition, the blog post example for their python script looks like they remove cloned elements when they export the map through their delElements() function.
Here is the delElement() and export() function for reference:
# the function takes a map and an array # it export the map to a pdf and add the pdf's path in the array def export(map, pdfPaths): delElements() s = generateUniqueFileName() print s arcpy.mapping.ExportToPDF(map, s) pdfPaths.append(s) # removing the elements stored in the original mxd # that are already cloned def delElements(): global line_sep, line_sep_feat, txtLyrNm, txtFldNm, txtFldVal if (line_sep != None): line_sep.delete() line_sep_feat.delete() txtLyrNm.delete() txtFldNm.delete() txtFldVal.delete()
Is this a requirement every time you generate a pdf?
Would this be necessary if I am only printing one page with dynamic text in order for new values to be passed onto the map document? For example, would you need to delete text element labelled WLA (its wild card name is called district_name) and update that value?