View by status   

Advanced Label Expressions with ArcPy

  • 160

  • Currently we are able to set a label expression with ArcPy by using the lblclass.expression method.  However, there is no way to check the "Advanced" box from ArcPy. 


    There also doesn't appear to be a way to select with language parser is uesd (VBScript or JScript)

    Expression Parser

    It would be very helpful to have this capability.  In addition to this, being able to load precreated label expressions from ".lxp" files through ArcPy would be great. 

    I would be extremely helpful if all of the settings in the label manager were exposed in ArcPy which include Label position, Fitting Strategy, and Conflict Resolution parameters.  All of this would fully enable complete automation over setting up labels for features.

    Finally, it would be nice if the label engine (default or Maplex) could be set within a python script.

    Thanks for considering!
    Tags :
     ArcMap 10, ArcPy, Maplex, Labels
    Posted by   flex_ama  to ArcGIS Desktop Oct 20, 2011

Share this idea Report Abuse

Comments (6)

Please log in to post a comment.

Jun 24, 2014
The new label expression is not the same as the advanced checkbox.  the label expression can't contain return values and use conditional statements.

Jan 31, 2013
A workaround is to use "\x22"

Aug 29, 2012
Seems like the Python parser is a little buggy. For example, you can't escape double quotes with a backslash as you can in standard Python. When I do this none of my labels will draw.

Feb 15, 2012
At 10.1 we added a new label expression parser for Python, so you can now build label expressions using Python.

Oct 24, 2011
Perhaps moving to python for labels as well instead of VB as there is a general move away from VB in arcmap.

Oct 20, 2011
this would be extremely helpful for us using arcpy



Terms and Conditions   |    Feedback   |   FAQs
Previous MonthNext Month