GetMessages (arcpy)
摘要
Returns the geoprocessing messages from a tool by specified severity level..
语法
GetMessages ({severity})
| 参数 | 说明 | 数据类型 | 
severity  | 
 The severity level of messages to return. 
 Not specifying a severity will return all types of messages. (默认值为 0)  | Integer | 
| 数据类型 | 说明 | 
| String | 
 The geoprocessing tool messages, separated by a newline ('\n').  | 
代码实例
GetMessages example
Returns the geoprocessing messages.
import arcpy
fc = arcpy.GetParameterAsText(0)
featurecount = arcpy.GetCount_management(fc)
# Print all of the geoprocessing messages returned by the 
#  last tool (GetCount)
#
print arcpy.GetMessages()
相关主题
9/15/2013