Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Text Element Questions

$
0
0
So I've got my text element function working in layout view, but it leaves me with two questions. Can multiple rows be concatenated into the row.getValue or can it only find single fields? Also, is it possible to return all feature records?

Here is the script I'm using to get the first result to fill the text box:

Code:

import arcpy

mxd = arcpy.mapping.MapDocument("Current")
mapLyr = arcpy.mapping.ListLayers(mxd, "Detail_2013")[0]

concatElem = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "concat")[0]

rows = arcpy.SearchCursor(mapLyr.dataSource)
row = rows.next()

typeElem.text = row.getValue("CONCAT")

mxd.save()
del mxd, row, rows,

Any suggestions a much appreciated.

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images