Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question

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.

share|improve this answer
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 '13 at 13:24
@TonyJohn, You can change the expression,…, however not the parser with arcpy. – artwork21 Feb 26 '13 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 '13 at 14:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.