Is there an expression that can be entered in the label expression that will force text to center? Such as the ones used to change case/replace/etc.

  • 2
    Can you please specify the software you are using? – Jakub Sisak GeoGraphics Mar 8 '12 at 19:18
  • ArcGIS 10 for Desktop ArcInfo – StephanieL Mar 8 '12 at 19:25

If you are talking about ArcMap then there is not a center tag. Isn't the text always centered? Do you mean justified? I guess it doesn't matter since there is no justified tag either. These are the documented tags:

Font:  <FNT name='Arial' size='18'> & [LABELFIELD] & </FNT> 
Color:  <CLR red='255' green='255' blue='255'> & [LABELFIELD] & </CLR> 
Bold:  <BOL> & [LABELFIELD] & </BOL> 
Italic:  <ITA> & [LABELFIELD] & </ITA> 
Underline:  <UND> & [LABELFIELD] & </UND> 
All caps:  <ACP> & [LABELFIELD] & </ACP> 
Small caps:  <SCP> & [LABELFIELD] & </SCP> 
Superscript:  <SUP> & [LABELFIELD] & </SUP> 
Subscript:  <SUB> & [LABELFIELD] & </SUB> 
Character spacing (0%=regular):  <CHR spacing='25'> & [LABELFIELD] & </CHR>  
Character width (100%=regular):  <CHR width='150'> & [LABELFIELD] & </CHR> 
Word spacing (100%=regular):  <WRD spacing='150'> & [LABELFIELD] & </WRD> 
Leading (0 pts=regular):  <LIN leading='12'> & [LABELFIELD] & </LIN> 
Un-Bold:  <_BOL> & [LABELFIELD] & </_BOL> 
Un-Italic:  <_ITA> & [LABELFIELD] & </_ITA> 
Un-Underline:  <_UND> & [LABELFIELD] & </_UND> 
Un-Superscript:  <_SUP> & [LABELFIELD] & </_SUP> 
Un-Subscript:  <_SUB> & [LABELFIELD] & </_SUB>

Since you are using Maplex there are alignment options for stacked labels. Sounds like you want to use 'Constrain to Center'. If none of the built in options work then you would need to write some VBScript to check the length of each line and add whitespace as needed.

| improve this answer | |
  • yes, I am aware of those tags, was just wondering if anyone knew of a 'center' tag. the alignment is usually changed outside of the expression window, i am looking to change it inside. strange, i know. however, if we can bold certain text, why can't we center certain text? – StephanieL Mar 8 '12 at 19:36
  • Center it in relation to what? The feature? That is a placement property not a label expression. – Rich Wawrzonek Mar 8 '12 at 19:42
  • No, the label. I have stacked labels and want the lines to have different justification with each other. Sorry for not being more clear, this is my first post! Wee! – StephanieL Mar 8 '12 at 19:49
  • No problem; best to add all the info in the original question. Are you talking about aligning labels for overlapping features or placing two labels for the same feature? – Rich Wawrzonek Mar 8 '12 at 19:56
  • One feature, One label. The label is stacked (Maplex) and has 3 lines. First line center justified, second line left justified, and third line center justified. I am asking for miracles, aren't I? I just don't want to have to put text boxes everywhere on my map. – StephanieL Mar 8 '12 at 20:00

Had the same question while looking at the label expression editor wondering where else they might have hidden, I mean placed, the option:

Labels tab -> Symbol -> Edit Symbol -> General tab has alignment settings

| improve this answer | |

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.