Command
Summary
Executes a geoprocessing tool as a single string.
Discussion
Legacy:
At ArcGIS 10, the Python window was introduced to replace the Command Line window. The Command function uses the syntax as used by the original Command Line, that is, parameters separated by spaces, unlike Python which separates parameters with commas.
Syntax
Command (command_line)
Parameter | Explanation | Data Type |
command_line |
The double-quoted string representing a command line command that is to be executed. | String |
Code Sample
Command example
Execute double-quoted command line string.
import arcpy from arcpy import env # Set current workspace and define command line command. # env.workspace = "C:/Data/Florida.gdb" commandString = "Clip_analysis Runways DadeCounty DadeRunways" # Execute command line string arcpy.Command(commandString)
Related Topics
10/28/2011