Show Navigation | Hide Navigation
You are here:
Writing geoprocessing scripts > Scripting Object: Properties and methods > Properties and Methods

GetMessages method

Release 9.1
Last modified August 19, 2005
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Properties and Methods"

Related Topics

Returns all messages for the specified severity (0=message, 1=warning, 2=error).


object.GetMessages([severity]) as String

Part Description
object The instantiated geoprocessing object
severity The type of messages to be returned. 0=message, 1=warning, 2=error. Not specifying a value here will return all types of messages.


Returns any message with a severity value of 2

from win32com.client import Dispatch
gp = Dispatch("esriGeoprocessing.GpDispatch.1")

# Execute the Clip tool.
gp.Toolbox = "Analysis"
gp.Workspace = "D:\\St_Johns\\data.mdb"
    # shows the messages if Clip fails
    print gp.GetMessages()

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.