Edit script tool code

By default, editing a script tool will open a tool's source file using Notepad. To set the editor to your preferred editor of Python integrated development environment (IDE), do the following:

  1. Click the Project tab on the ribbon. In the list on the left, click Options.

    The Options dialog box appears.

  2. In the list of side tabs, under the Application category, click the Geoprocessing tab.
  3. In the Script Editor dialog box, enter or browse to the IDE you will be using.
  4. Click OK.

Edit script code from the Catalog pane or Catalog view

To edit a script tool's code from the Catalog pane or Catalog view, complete the following steps:

  1. Right-click a script tool in the Catalog pane or Catalog view, and select Edit.

    If the script tool is password protected, a pop-up appears. Type your password in the Enter Password text box and click OK.

    If the script is embedded, a temporary .py file will open.

  2. Edit the .py file and save and close the file.

    If the script is embedded, the toolbox is updated with your edits.

Edit script code from the Tool Properties dialog box

To edit a script tool's code from the Tool Properties dialog box, complete the following steps:

  1. Right-click a script tool in the Catalog pane or Catalog view, and select Properties.

    The Tool Properties dialog box appears.

  2. In the list of side tabs, click the Execution tab.

    If the script is password protected, a pop-up appears. Type your password in the Enter Password text box and click OK.

  3. Edit the code directly in the Tool Properties dialog box.

    Alternatively, click the Open in Script Editor button and edit in a script editor, and then save and close the file.

    If the script is embedded, a temporary .py file is used.

  4. Click OK.

関連トピック