Select to view content in your preferred language

Add Message to Geoprocessing Tool

352
1
03-19-2025 07:45 AM
AnjeliDubey
Emerging Contributor

Hello!

I am publishing a geoprocessing tool from ArcPro that contains arcpy.AddMessage in the original script, but when the tool is complete, the message does not show. I tried to change the properties of the message level to "Info" under the message level tab, but it still does not show up when I run the tool, as shown below.

AnjeliDubey_0-1742395539195.png

 

Does AddMessage work for tools run in the Enterprise portal? If not, how will I be able to view information in the messages tab when the tool is completed? 

0 Kudos
1 Reply
ChrisUnderwood
Esri Regular Contributor

Hello @AnjeliDubey , that Message setting looks like it should work, but we don't know how your code is written. Try something like this:

#MINIMAL SCRIPT
import arcpy
arcpy.AddMessage("Hello World !!!")

ArcGIS Pro
From Toolbox > New > Script, from Execution paste in the code. Open & Run the tool.
From View Details > Messages, you can see the Message.
From Open History, right click on the executed script > Share As > Share Web tool > Configuration tab, set Message Level = Info > Publish.
From the REST endpoint of the service > select the Task > select Submit job. From Check Job Details you will see your Hello World !!! message.

0 Kudos