I have 2 questions:
I know how to manually go to Layer Properties>Labels tab>Label Field and choose my label field. I also know that I could set up my primary label field and save the setting as a layer (*.lyr) file. This question, though, is more about how the label field is chosen by the program prior to user interaction.
First: When a new layer (shapefile, ArcSDE layer, personal/file geodatabase featureclass) is added to ArcMap, how is the default label field chosen? From my experience, it isn't chosen by field order, nor alphabetical by field. My best guess so far is that it might chose the first field of text/varchar (alphanumeric) type.
Second: Is there a way to define what the "primary label field" will be for a layer within the shapefile, sde, or gdb files, or are you stuck with saving layer files or letting the system pick for you.
Answer
According to this post, the default display field is chosen according to the following priorities:
- First field of type Text whose name contains the word "name" (case-insensitive)
- First field of type Text
- First field of an integer type (Long or Short, presumably)
- First field of any type
I don't think there is any way to specify the primary display field without using a layer or layer file, other than using the above logic to name/order your fields accordingly.
No comments:
Post a Comment