Previewing a geoprocessing script in a Python editor |
Geoprocessing |
Segment 4 of 8 |
Top Previous Next |
Right-click the script in the ArcToolbox window and click Edit. This opens the Python script in the Python script editing enviroment installed on your computer. In this example the application is PythonWin; it might also open in IDLE (Integrated DeveLopment Environment for Python). You can view or modify the contents of the script.
Examine the code. Notice that the values set for the variables gp.workspace, clipFeatures, out_workspace, and XYTolerance are set as system arguments (sys.argv [ ]). Four parameters need to be defined for these system arguments in the Properties dialog box of the script so the parameters will display on the script’s dialog box.
Note: Instead of using system arguments for the values of variables, you could hard code the value. However, hard coding the value means that only the value specified in the script can be used—for example, the path to a workspace containing input data.
Close the script editing application.