I have a labeling expression using two attributes I want the first one to be size 14 and the second one to be on a new line and be size 8. This was my attempt so far:
"<FNT name='Arial' size='14'>" & [Sec_Unit_L] & "</FNT>" + "\n" + "<FNT name='Arial' size='8'>" & [TWP_Label] & "</FNT>"
I get the following error message
-
1Are you using the python or VB parser? Your question says python but your concatenation is VB.Michael Stimson– Michael Stimson2017年05月31日 23:39:51 +00:00Commented May 31, 2017 at 23:39
-
Welcome to GIS SE! As a new user please take the tour to learn about our focused Q&A format.Midavalo– Midavalo ♦2017年05月31日 23:41:25 +00:00Commented May 31, 2017 at 23:41
1 Answer 1
There are a few formatting tags for ArcGIS, in either python or VB parser they are the same:
In VB:
"<FNT size='14'>" & [Sec_Unit_L] & "</FNT>" + vbnewline + "<FNT size='8'>" & [TWP_Label] & "</FNT>"
In Python:
"<FNT size='14'>{}</FNT>\n<FNT size='8'>{}</FNT>".format([Sec_Unit_L],[TWP_Label])
Whenever you open an enclosure you must close it, in this case <FNT XXX>
matches a closing </FNT>
otherwise the opening enclosure doesn't change the text but gets printed in the label.
-
Thank you so much, I think I confusing myself by using a bit VB in a Python expression. Thanks againrockycove– rockycove2017年06月01日 15:10:12 +00:00Commented Jun 1, 2017 at 15:10
-
@rockycove The best way to say "thanks" here is to upvote and/or accept the answer. See What should I do when someone answers my question?2017年06月03日 15:23:35 +00:00Commented Jun 3, 2017 at 15:23
Explore related questions
See similar questions with these tags.