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:
- Click the Project tab on the ribbon. In the list on the left, click Options.
The Options dialog box appears.
- In the list of side tabs, under the Application category, click the Geoprocessing tab.
- In the Script Editor dialog box, enter or browse to the IDE you will be using.
- 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:
- 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.
- 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:
- Right-click a script tool in the Catalog pane or Catalog view, and select Properties.
The Tool Properties dialog box appears.
- 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.
- 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.
- Click OK.
Rubriques connexes
Vous avez un commentaire à formuler concernant cette rubrique ?