Command (arcpy)
摘要
将地理处理工具作为单个字符串执行。
讨论

在 ArcGIS 10 中,引入 Python 窗口来替代命令行窗口。与用逗号分隔参数的 Python 不同,命令函数使用与原始命令行相同的语法(即用空格分隔参数)。
语法
Command (command_line)
参数 | 说明 | 数据类型 |
command_line |
The double-quoted string representing a command line command that is to be executed. | String |
数据类型 | 说明 |
String |
各地理处理工具消息由换行符 ('\n') 隔开。如果工具运行失败,将仅返回错误消息。 |
代码实例
命令示例
执行加双引号的命令行字符串。
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)
相关主题
9/15/2013