garnet

How to select expression parser for labeling in arcpy.

Discussion created by garnet on Jan 18, 2013
Latest reply on Jan 31, 2013 by curtvprice
Hi all
I have a script which adds a layer file to an mxd, sets labels on and should label features with the first 10 characters of a attribute.
the labeling part is

[PHP]for i in ll.labelClasses:
   i.expression ="[FC_NAME] .substring(0,10)[/PHP]
 
This code sets the expression OK, I can see it in the FC properties (labels) manually in TOC. The problem is that the parser is set to VBScript, and the above expression is Jscript.

How do I set the parser in my code to be JScript?

Outcomes