Hey there! I'm a newbie and I'm having some issues with this rutine, I have a .mxd with several parcels and I'm trying to make an arcpy rutine to identify the scale text among the layout element objects, I know Scale text belongs to MapSurround Elements, but I haven't found the way to acces to it! what I want is to export some selected parcels to a PDF only if they are of a certain scale, if I have 10 parcels with different scales, I want to export only the ones associated with this condition "Scale < 2000"
I always get this message:
AttributeError: 'MapSurroundElement' object has no attribute 'scaleText'
Here is what I've tried:
mxd = arcpy.mapping.MapDocument(r"D:\00salida\Plantilla_8x11.mxd")
for elm in arcpy.mapping.ListLayoutElements(mxd, "MAPSURROUND_ELEMENT"):
if elm.scaleText < 2000:
arcpy.mapping.ExportToPDF(mxd, r"\00salida\PDFS\C" + str(i) + ".PDF")
pdfDoc = arcpy.mapping.PDFDocumentOpen(r"d:\00salida\PDFS\C" + str(i) + ".PDF")
pdfDoc.appendPages(r"d:\00salida\posterior.pdf")
pdfDoc.saveAndClose()
del mxd, elm
I hope someone can help me! :confused:
PS: English isn't my native language 😛