I have a attribute table for contours every 10 feet but would like to label ONLY the major contours using the value specified in the Contour field. Found some similar messages but can't get the syntax correct. Please help. New to Python.
Solved! Go to Solution.
ArcGIS Help 10.1 "Placing labels for contours" should do what you want.
ArcGIS Help 10.1 "Placing labels for contours" should do what you want.
James,
Here is my modification. I have a string field called Line_typ which has the contours I want to label as major. Do I need to have an integer field like you do in the example and have values for each of the line types to choose a number for all those that are called major that I want to label or can I use that string field?
This did not work.
Siran
Tried this:
no luck
Try to wrap your evaluation statement into quotes:
If [Lin_typ] = "major" Then
I created a field called index and used the value 1 for all major contours. See above. Still get error message about line 1 syntax
Did you set the field type to Short Integer for the Index field?
I setup the same way and do not get any error.
I did set the index field to short integer.
I am a big fan of label expressions but since the label expression does not seem to be working for you, why don't you try Label Classes. Change the Method under the Labels tab to "Define classes of features and label each class differently".
Next, click on the SQL Query button to essentially do a Definition Query for [Lin_typ] = "Major".
Set your Label Field to be [Contour] and then setup the text symbology:
I hope this helps.
Cory
Right answer! much easier. Will I ever learn Python? I really think its cool...when it works! Thanks so much.