GetMessages
汇总
按指定的严重性级别从工具返回地理处理消息。
语法
GetMessages({severity})
| 参数 | 说明 | 数据类型 |
|---|---|---|
|
severity |
Specifies the type of messages to be returned.
Not specifying a severity level will return all types of messages. (默认值为 0) |
Integer |
返回值
| 数据类型 | 说明 |
|---|---|
|
String |
多个地理处理工具消息由换行符 ( |
代码示例
GetMessages 示例
返回地理处理消息。
import arcpy
fc = arcpy.GetParameterAsText(0)
arcpy.management.GetCount(fc)
# Print all of the geoprocessing messages returned by the
# last tool (GetCount)
print(arcpy.GetMessages())