I have a large number of layers (hundreds) with label expressions written in VBScript. I am using ArcMap 9.3.1, and I'm now starting to export the layers as MPKs for use in our ArcGIS Runtime (WPF) application.

I get an error that says that the layers can not be exported to MPK with Runtime support because it has label expressions written in VBScript.

It will take to long, and too much manpower to manualy convert the label expressions from VBscript to Python or Javascript. I'm looking for a tool to do this automatically.

Another possible solution can be to enable the export of layers with VBScript expressions to MPK format. This solution would be the best case scenario!

Any help will be very much appriciated!

1 Answer 1


Changing the parser from VBScript to python or Javascript may not be simple to automate. This object has not been exposed by ESRI within the arcpy library, see this ArcGIS Ideas page, however it may be automated via arcobjects/javascript via IAnnotationExpressionEngine getExpressionParser() object.

  • Changing the processing language is not enough, I need to change the expression to match the new language (JavaScript or Python), currently it's written in VBScript.
    – Tony John
    Feb 26, 2013 at 13:24
  • 1
    @TonyJohn, You can change the expression, resources.arcgis.com/en/help/main/10.1/index.html#//…, however not the parser with arcpy.
    – artwork21
    Feb 26, 2013 at 13:48
  • But my expression is written in VBScript (e.g. "Dim var1..."), and I need to convert it to another language (JavaScript/Python). How do you suggest I do it automatically?
    – Tony John
    Feb 26, 2013 at 14:21

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.