GetIDMessage (arcpy)

摘要

Get the string of the error or warning ID message.

讨论

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.

语法

GetIDMessage (message_ID)
参数说明数据类型
message_ID

The geoprocessing message ID.

Integer
返回值
数据类型说明
String

The message string associated with the message ID.

代码实例

GetIDMessage example

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

import arcpy

readMsg = arcpy.GetIDMessage(84001)
arcpy.AddMessage(readMsg)

# The returned value should be:
#   u'Reading data....'

相关主题

9/15/2013