Résumé
Executes a geoprocessing tool as a single string.
Discussion
Héritage :
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.
Syntaxe
Command (command_line)
Paramètre | Explication | Type de données |
command_line | The double-quoted string representing a command line command that is to be executed. | String |
Type de données | Explication |
String | The geoprocessing tool messages, separated by a newline ('\n'). If the tool fails, only the error messages are returned. |
Exemple de code
Execute double-quoted command line string.
import arcpy
# Set current workspace and define command line command.
arcpy.env.workspace = "c:/data/florida.gdb"
command_string = "Clip_analysis Runways DadeCounty DadeRunways"
# Execute command line string
arcpy.Command(command_string)
Rubriques connexes
Vous avez un commentaire à formuler concernant cette rubrique ?