Need python label expression to label linear assets in Arcmap 10.3 with length (rounded to nearest whole number) with a foot symbol(') at the end, plus a space, then text from a different field. Have this so far: round(float( [LLENGTH]), 0)
don't know about 10.3 or vb but in python and recent versions
leng = 7.4
fld = 'from field'
result = "{}' {}".format(round(leng), fld)
print(result)
7' from field
Thanks, I may have tagged the question incorrectly, looking for label expression syntax for the Maplex Label Engine in Arcmap
Damon,
Dan has given the correct Python Label Expression in line 5 of his example. The first variable will be the LENGTH field, and the second is whatever other text field you chose.
You may have to convert the length field to a float first (line 3).
"{}' {}".format(round(leng), fld)
"{}' {}".format(round(float(leng)), fld)
Works great. Thanks!