GetMessage (arcpy)
Récapitulatif
Returns a geoprocessing tool message by its index position.
Syntaxe
GetMessage (index)
Paramètre | Explication | Type de données |
index |
The message to retrieve. | Integer |
Type de données | Explication |
String |
The geoprocessing tool message. |
Exemple de code
GetMessage example
Returns specified geoprocessing messages.
import arcpy
fc = arcpy.GetParameterAsText(0)
arcpy.GetCount_management(fc)
# Print the first and last message returned by the last
# tool executed (GetCount)
message_count = arcpy.GetMessageCount()
print(arcpy.GetMessage(0))
print(arcpy.GetMessage(message_count - 1))
Thèmes connexes
4/26/2014