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.
ArcGIS Help 10.1 "Placing labels for contours" should do what you want.
I definitely have the Python parser in the window. Here is my script and error message: What could be wrong?
Your expression was actually written for VBScript, not the Python parser. Maybe you should double-check that.
Right answer! much easier. Will I ever learn Python? I really think its cool...when it works! Thanks so much.
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
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
Try to wrap your evaluation statement into quotes:
If [Lin_typ] = "major" Then
Tried this:
no luck
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
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.