I'm trying to add a title to an exported pdf. The output should look similar to the attached file (ignore the 'Clip -- Tile 232') Instead of the 'Planar' title (which I supplied manually), however, I'd like to be able to supply the title from my pythonaddins (ArcGIS 10.1) code.
The 'Planar' title resides on a TextElement that I added in Layout view. As shown, this title resides on its own data frame. The relevant code is as follows:
def createPDF(self):
# Method to obtain truncDateString datestamp
# self.mxdClipLayer is the mxd of interest
getDateTime()
pdfString = 'Clip_' + truncDateString[9:15]
for elm in arcpy.mapping.ListLayoutElements(self.mxdClipLayer, "TEXT_ELEMENT"):
print elm. #???
arcpy.mapping.ExportToPDF(self.mxdClipLayer, envPath + "pdf/" + pdfString + ".pdf")
The problem lies with the print statement. I'm trying to print elm.name or elm.text, but the Intellisense doesn't provide any property associated with elm. Furthermore, the program fails when I try to force the issue by including 'text' or 'name' as the property.
Thanks in advance for any help you can provide.