AnsweredAssumed Answered

python labeling

Question asked by davidboconnor on Feb 5, 2013
Latest reply on Jun 8, 2017 by jwittler
Hi  - I'm just looking to start learning Python.  Starting with the absolute basics, I'd just like to make some labels with it.

On the help page here:  ,

It says "For example, you might use the bold formatting tag to make the first line bold in a stacked, multiline label".  That's exactly what I'd like to do, but I'm having trouble doing it.  So far I've been able to pull the five values from my attribute table and have a name for them, but I can't find out how to manipulate it any further.  Ideally, I'd like the first line to be bold and underlined, and for the all the lines to start at the same lateral position, which I think is called left justified.

Here's what I have so far:  [Location_I] + '\n' +"PCE: " + [PCE] + '\n' +"TCE: " + [TCE] + '\n' +"cDCE: " + [cDCE] + '\n' +"VC: " + [VC] + '\n' +"11DCE: " + [DCE_11DCE] + '\n' +"11DCA: " + [DCA_11DCA]

In the properties window of a pointfile feature class, I'm adding this into the label field after clicking on the expression button and selecting Python from the drop down list.  If you could point me to other examples or good reference pages, I would be grateful.

Thank you.