Skip to main content

Custom Message (Model Tools)

Summary

Adds custom error, warning, or informative messages to a model's messages to enhance the context of a model when run.

Usage

  • This tool is only available from ModelBuilder for use in models. The tool is not available from the Geoprocessing pane or from Python.

  • This tool supports customized messages by using the Custom Message option for the Message Type parameter.

  • Alternatively, you can use any of the standard Esri error or warning messages using the Message Code option for the Message Type parameter. To use a standard error or warning message, you must know the six-digit code. In the offline help system, the ID codes are in the Geoprocessing Tools help. In both the online help system and offline help system, you can search for a code using the full six-digit ID including any leading zeros. Once you identify an appropriate ID, make note of any additional information that must be included in the message, denoted as <value> in the message.

  • For the Message Codes parameter, values can be provided to be substituted into a message. Messages that support substitution are denoted with <value> in the documentation.

  • For the Message Codes parameter, an Additional Message value can be incorporated with a Message Code value to improve the context of the message.

Parameters

Label Explanation Data type

Message Type

Specifies whether custom messages or standard Esri messages will be used.

  • Message CodeStandard Esri messages accessed by the message IDs will be used.

  • Custom MessageCustom messages will be used.

String

Message Codes

(Optional)

Esri standard messages will be added when the model is run.

This parameter is active when the Message Type parameter is set to Message Code.

Value table columns:

  • Message SeveritySpecifies the message severity that will be used.

    • InformativeThe message will be an informative message.

    • WarningThe message will be a warning message.

    • ErrorThe message will be an error message.

  • Message CodeAn Esri standard six-digit geoprocessing message code.

  • Code Argument 1The first value that will be substituted into the message.

  • Code Argument 2The second value that will be substituted into the message.

  • Additional MessageAn additional message for context that will be added to the model when run.

Value Table

Custom Messages

(Optional)

Custom messages will be added when the model is run.

This parameter is active when the Message Type parameter is set to Custom Message.

Value table columns:

  • Message SeveritySpecifies the message severity that will be used.

    • InformativeThe message will be an informative message.

    • WarningThe message will be a warning message.

    • ErrorThe message will be an error message.

  • Custom MessageThe message string.

Value Table

Derived output

Label Explanation Data type

Output Messages

The error, warning, and informative messages.

String

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes