I am trying to label a street centerline layer with a condition based on street width. I am using the Python parser and I can't figure out this simple logic. Neither of these questions address how to accomplish this within the "Label Expression" window of ArcGis using Python:
Customizing label features using arcpy
Displaying combined data values in ArcMap
My attempt at it looks like this:
def FindLabel ( [NAME] ):
if [WIDTH] > 30
return [NAME]
GIS returns me an error when I try this.
Any help is much appreciated.
Thanks in advance,
mike
Best Answer
From the help on Building label expressions:
Also, you need to pass two parameters to your function because you are referencing two different fields.
Parser:
Python
Expression: