GetMessageCount
摘要
Returns a numeric count of all the returned messages from the last executed command.
语法
GetMessageCount ()
数据类型 | 说明 |
Integer |
The count of returned messages from the last executed command. |
代码示例
GetMessageCount example
Returns the first and last geoprocessing messages.
import arcpy fc = arcpy.GetParameterAsText(0) arcpy.GetCount_management(fc) # Print the first and last geoprocessing tool messages # messageCount = arcpy.GetMessageCount() print arcpy.GetMessage(0) print arcpy.GetMessage(messageCount - 1)
相关主题
7/10/2012