GetMessage (arcpy)
サマリ
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)
関連トピック
9/14/2013