GetMessage
Resumen
Returns a geoprocessing tool message by its index position.
Sintaxis
GetMessage (index)
Parámetro | Explicación | Tipo de datos |
index |
The message to retrieve. | Integer |
Tipo de datos | Explicación |
String |
The geoprocessing tool message. |
Ejemplo de código
GetMessage example
Returns specified geoprocessing messages.
import arcpy fc = arcpy.GetParameterAsText(0) # Run the GetCount tool # result = arcpy.GetCount_management(fc) # Print the first and last message returned by the last # tool executed (GetCount) # messageCount = arcpy.GetMessageCount() # Print the first message # print arcpy.GetMessage(0) # Print the last message # print arcpy.GetMessage(messageCount - 1)
Temas relacionados
7/10/2012