GetMessages method |
|
|
Release 9.1
Last modified August 19, 2005 |
Print all topics in : "Properties and Methods" |
Returns all messages for the specified severity (0=message, 1=warning, 2=error).
| 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. |
from win32com.client import Dispatch
gp = Dispatch("esriGeoprocessing.GpDispatch.1")
# 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()