Hi colleagues,
I am recently facing the following problem:
is it possible to write messages to the output pane of the GP widget?
(arcpy.AddMessage() does not work, btw)
Any help is highly appreciated.
Philip
Solved! Go to Solution.
Philip,
Yes! You must make sure that the geoprocessing service has the message level turned on to info so you will see all of the messages and not just errors and warnings. I believe this is "none" by default.
I then made a simple modification to the geoprocessing widget.js onJobComplete section to display messages. This was just to prove it was possible, but I am sure with a bit more effort, a new function could be added to display it the way you'd like. Here is a snippet of the modification that I made to the onJobComplete function.
//onJobComplete is invoked even if jobStatus is STATUS_FAILED. //It hides this.infoNode so user can not see the error message! //if(jobInfo.jobInfo.jobStatus !== JobInfo.STATUS_SUCCEEDED){ this._createErrorMessages(jobInfo.jobInfo.messages); //return; //}
I just commented out the if statement so that all messages would be displayed.
Regards,
Tom
Philip,
Yes! You must make sure that the geoprocessing service has the message level turned on to info so you will see all of the messages and not just errors and warnings. I believe this is "none" by default.
I then made a simple modification to the geoprocessing widget.js onJobComplete section to display messages. This was just to prove it was possible, but I am sure with a bit more effort, a new function could be added to display it the way you'd like. Here is a snippet of the modification that I made to the onJobComplete function.
//onJobComplete is invoked even if jobStatus is STATUS_FAILED. //It hides this.infoNode so user can not see the error message! //if(jobInfo.jobInfo.jobStatus !== JobInfo.STATUS_SUCCEEDED){ this._createErrorMessages(jobInfo.jobInfo.messages); //return; //}
I just commented out the if statement so that all messages would be displayed.
Regards,
Tom