jhodel@cloudpointgeo.com

Dynamic tables using data driven pages

Discussion created by jhodel@cloudpointgeo.com on Sep 24, 2012
Latest reply on Sep 25, 2012 by jbarrette-esristaff
Trying to update tables of water valve info dynamically as I change the data driven page.  Its working but I need to decrease the width of text and adjust line spacing in the 3rd column.  Any help would be greatly apprecated.

[ATTACH=CONFIG]17933[/ATTACH]
#Clear all table text values

tab1Col1Value = ""
tab1Col2Value = ""
tab1Col3Value = ""

for row in Valves_outputrows:
  tab1Col1Value += str(row.Valve_ID) + "\n"
  tab1Col2Value += str(row.vDiameter) + "\n"
  tab1Col3Value += str(row.vdescription) + "\n"

tab1Col1Txt.text = tab1Col1Value
tab1Col2Txt.text = tab1Col2Value
tab1Col3Txt.text = tab1Col3Value

#elmWidth = 2.5
#elmText = tab1Col3Txt.text
#elm = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Table1Column3")[0]
#x = 10
#elm.text = '<FNT name='Arial' size=' + str(x) + '>' + elmText + '</FNT>'
#while elm.elementWidth > float(elmWidth):
#    elm.text = '<FNT name="Arial" size="' + str(x) + '">' + elmText + '</FNT>'
#    x = x - 1

Attachments

Outcomes