GetIDMessage (arcpy)

Récapitulatif

Get the string of the error or warning ID message.

Discussion

GetIDMessage allows you to access ArcGIS tool message codes for use in Python. These message codes are found are documented in Tool errors and warnings.

Syntaxe

GetIDMessage (message_ID)
ParamètreExplicationType de données
message_ID

The geoprocessing message ID.

Integer
Valeur renvoyée
Type de donnéesExplication
String

The message string associated with the message ID.

Exemple de code

GetIDMessage example

Access a message string using GetIDMessage and add to the tool messages using AddMessage.

import arcpy

message = arcpy.GetIDMessage(84001)

# The returned value should be:
#   u'Reading data....
arcpy.AddMessage(message)

Thèmes connexes

4/26/2014