SetMessageLevels

Zusammenfassung

Sets additional categories of informative messages to be returned with geoprocessing tool messages.

Geoprocessing messages can be accessed with several ArcPy functions including GetMessages and GetAllMessages.

Diskussion

Hinweis:

This function does not take into account how the Additional Information Messages options have been set.

Syntax

SetMessageLevels (levels)
ParameterErläuterungDatentyp
levels
[levels,...]

Specifies the categories of messages that will be included in geoprocessing tool messages.

  • NORMALOnly standard tool messages will be included. This is the default.Standard tool messages will be always be included. Use this option to reset back to the default, if other options have been previously set.
  • COMMANDSYNTAXThe tool messages will include a command syntax message. Command syntax is not Python code. It's a space-delimited string of the tool name and the parameter values used to run the tool.
  • DIAGNOSTICSThe tool messages will include diagnostic messages. The messages include details about geoprocessing preprocessing and postprocessing, geoprocessing thread disconnecting and reconnecting, and more. Diagnostic messages are the same as the geoprocessing event messages logged in the ArcGIS Pro Diagnostic Monitor. Esri staff uses diagnostic messages to troubleshoot geoprocessing tool issues.
  • PROJECTIONTRANSFORMATIONThe tool messages will include geographic transformation-related messages. These messages are applicable when a tool requires transforming input datasets to a different coordinate system.

Multiple options can be set using a list. A single option can be set as a string or a list.

(Der Standardwert ist NORMAL)

String

Codebeispiel

SetMessageLevels example

Use SetMessageLevels to return syntax messages with geoprocessing tool messages.

import arcpy

arcpy.SetMessageLevels(['COMMANDSYNTAX'])

Verwandte Themen