Command
サマリー
Runs a geoprocessing tool as a single string.
ディスカッション
レガシー:
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 window, that is, parameters separated by spaces, unlike Python which separates parameters with commas.
構文
Command(command_line)
| パラメーター | 説明 | データ タイプ |
|---|---|---|
|
command_line |
The double-quoted string representing the tool to be run. |
String |
戻り値
| データ タイプ | 説明 |
|---|---|
|
String |
The geoprocessing tool messages, separated by a newline ('\n'). If the tool fails, only the error messages are returned. |
コードのサンプル
Command example
Run 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"
# Run command line string
arcpy.Command(command_string)