How do I show the following label for our sewer pipes?
Facility ID
Pipe Length rounded off to the tenth
This is the script I attempted to use to show this:
'<BOL>' + [GXP_IDNEW] + '</BOL>' + '\n' + [Shape_Length] + round(float([Shape_Length]), 1) + "'" + ", " + [PIPE_DIA]
I keep getting the following error when writing the script
Invalid Expression
Error 0 on line 0.
Traceback (most recent call last):
File "<expression>", Line 1, in <module>
File "<string>", line 2, in esri_FindLabel
TypeError: must be str, not float.
Basically, when I show JUST the pipe length rounded off to the tenth, it will display. But, when I include it in a stacked label, the error shows up.
What am I doing wrong?
anything numeric must be converted to a string prior to concatenation
str([Shape_Length]) + str(round(float([Shape_Length]))