Synthèse
Returns a numeric count of all the returned messages from the previously run tool.
Syntaxe
GetMessageCount ()
Type de données | Explication |
Integer | The count of returned messages from the previously run tool. |
Exemple de code
Returns the first and last geoprocessing messages.
import arcpy
fc = arcpy.GetParameterAsText(0)
arcpy.management.GetCount(fc)
# Print the first and last geoprocessing tool messages
message_count = arcpy.GetMessageCount()
print(arcpy.GetMessage(0))
print(arcpy.GetMessage(message_count - 1))
Rubriques connexes
Vous avez un commentaire à formuler concernant cette rubrique ?