GetMessageCount (arcpy)

Récapitulatif

Returns a numeric count of all the returned messages from the last executed command.

Syntaxe

GetMessageCount ()
Valeur renvoyée
Type de donnéesExplication
Integer

The count of returned messages from the last executed command.

Exemple de code

GetMessageCount example

Returns the first and last geoprocessing messages.

import arcpy

fc = arcpy.GetParameterAsText(0)
arcpy.GetCount_management(fc)

# Print the first and last geoprocessing tool messages
message_count = arcpy.GetMessageCount()
print(arcpy.GetMessage(0))
print(arcpy.GetMessage(message_count - 1))

Thèmes connexes

4/26/2014