I am making a map of a bicycle tour I took on ArcGIS.

I have created a layer called "Sleep Stops".

Furthermore, I have created 3 label classes called "Name", "Favors", and "NotableFacts"

I have quickly realized that trying to enter a text string for the label class expression results in every single point on the layer being labeled the exact same thing. For instance, every single point on "Sleep Stops" gets labeled "Friendly Crossways Hostel" as its name.

One possible solution is to create 3 new fields for this layer: "name", "favors", and "NotableFacts" and to edit these for each point. Then, I can simply label each point with its value for each of these fields.

How do I create my own text values for fields as I create points?

  • If all the labels share the same fonts/symbology, you could simply create a new field (e.g. "Type"), and assign values to your records according to the typology you have ("Name", "Favors", and "NotableFacts"). Then, in the label window, just choose this field for labeling and all the points will be labeled according to their values found in "Type" field. – umbe1987 Sep 10 '19 at 7:27

You create the text for the text values for fields either editing the attributes of the newly created feature (your point for sleep stop). Your newly created feature has to still be selected otherwise the attributes editing panel will be blank. Another way is to open the feature class attribute table and edit directly there, though editors frequently insert carriage returns into the attribute fields this way. Since you have 3 fields and may want all of their values on separate lines, this would be where you labeling expression will come into play. Below is a python label example where '\n' is used to insert a newline.

!field1! + '\n' + !field2! + '\n' + !field3!

ArcGIS adds the exclamation marks when you select a field in you label expression builder. Be aware you have to be careful about what your expression language is, there is a drop down allowing you to select from Python, VBScript and maybe JScript or Arcade depending on your software version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.