Show Navigation | Hide Navigation
You are here:
Geoprocessing > Automating your work with scripts > Scripting object: Properties and Methods > Properties and Methods

GetMessages method

Release 9.3
Last modified January 19, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Properties and Methods"


Related Topics

Note: This topic was updated for 9.3.1.

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

Syntax


object.GetMessages({severity} As Long) As String

{} = optional

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 returns all types of messages.


Examples


Returns any message with a severity value of 2.

import arcgisscripting
gp = arcgisscripting.create(9.3)

# Execute the Clip tool.
#
gp.Toolbox = "Analysis"
gp.Workspace = "D:/St_Johns/data.mdb"
try:
    gp.Clip("roads","urban_area","urban_roads")
except:
    # Shows the messages if Clip fails
    #
    print gp.GetMessages(2)


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