GetMessage
Résumé
Returns a geoprocessing tool message by index position.
Syntaxe
GetMessage(index)
| Le paramètre | Explication | Type de données |
|---|---|---|
|
index |
The message to retrieve. |
Integer |
Valeur de retour
| 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.management.GetCount(fc)
# Print the first and last message returned by the last
# tool run (GetCount).
message_count = arcpy.GetMessageCount()
print(arcpy.GetMessage(0))
print(arcpy.GetMessage(message_count - 1))