With the dyn type="page" you can create dynamic text with any attribute field of the Data Driven Pages index layer. For example, if you have an attribute on the index layer named POPULATION, you can create a dynamic text tag using this field, <dyn type="page" property="POPULATION"/>to dynamically display the POPULATION values for each page in the layout.
for page in export_loop: layer = "data_driven_layer" ddp_field = "Field_Name" desc = arcpy.Describe(layer) shapeField = desc.shapeFieldName where = "%s = '%s'" %(ddp_field,ddp_value) s_cursor = arcpy.SearchCursor(layer,where) for row in rows: page_area = row.getValue(shapeField).area for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"): if elm.name == "Dyn_Area": elm.text = page_area
Pit <dyn type="page" property="number"/> Site Plan
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.