GetMessages
Zusammenfassung
Returns the geoprocessing messages from a tool by a specified severity level.
Syntax
GetMessages({severity})
| Parameter | Erläuterung | Datentyp |
|---|---|---|
|
severity |
Specifies the type of messages to be returned.
Not specifying a severity level will return all types of messages. The default value is 0. |
Integer |
Rückgabewert
| Datentyp | Erläuterung |
|---|---|
|
String |
The geoprocessing tool messages, separated by a newline ( |
Codebeispiel
GetMessages example
Returns the geoprocessing messages.
import arcpy
fc = arcpy.GetParameterAsText(0)
arcpy.management.GetCount(fc)
# Print all of the geoprocessing messages returned by the
# last tool (GetCount)
print(arcpy.GetMessages())