Export a model to a script


Instructions provided describe how to export a model from ModelBuilder to a Python script, VBScript, or JScript.

This article pertains to ArcGIS Desktop versions 9.x and 10.0 only. Later versions of ArcGIS may contain different functionality, as well as different names and locations for menus, commands and geoprocessing tools.


Follow the steps below:
  1. Right-click the desired model in ArcToolbox and click Edit.
  2. On the Model menu, click Export > To Script, and select a script from the list.
[o]export model to script
As of ArcGIS version 10.0, only Python is supported; VBScript and JScript are not available from the Export menu in ModelBuilder.
  1. Browse to the desired location to save the script and type the file name. Click Save.
    • To view the script, navigate to the location of the script in Windows. Right-click the script and click Edit.
    • The script opens with the default application set in the operating system.

Article ID:000008633

  • ArcMap 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic