Select to view content in your preferred language

ArcGIS Pro 2.9.2 - How to print messages in View Details dialog box when using Code Block in Calculate Field?

1019
3
04-13-2022 01:00 AM
VincentLaunstorfer
Frequent Contributor

Hi,

As everybody, I use Calculate Field regularly in ArcGIS Pro.

I wonder if it is possible to print messages in the Code Block section. I used the print() statment and the syntax is correct. After running the Calculate Field tool, if I click on the View Details, I cannot see the print messages I wished. This is purely informative and this helps to understand the calculation in details...

Any guess?

0 Kudos
3 Replies
Luke_Pinner
MVP Regular Contributor

Have never tried, but perhaps:

arcpy.AddMessage("your message")
0 Kudos
VincentLaunstorfer
Frequent Contributor

Thanks Luke.

I already tried the arcpy.AddMessage() but this one does not work in Code Block...

0 Kudos
JamesWilcox1970
Occasional Contributor

Would a combination of arcpy.AddMessage and arcpy.GetMessages work?

0 Kudos