GetMessage
摘要
Returns a geoprocessing tool message by its index position.
语法
GetMessage (index)
| 参数 | 说明 | 数据类型 | 
index  | 
 The message to retrieve.  | Integer | 
| 数据类型 | 说明 | 
| String | 
 The geoprocessing tool message.  | 
代码示例
GetMessage example
Returns specified geoprocessing messages.
import arcpy fc = arcpy.GetParameterAsText(0) # Run the GetCount tool # result = arcpy.GetCount_management(fc) # Print the first and last message returned by the last # tool executed (GetCount) # messageCount = arcpy.GetMessageCount() # Print the first message # print arcpy.GetMessage(0) # Print the last message # print arcpy.GetMessage(messageCount - 1)
相关主题
7/10/2012