model builder - can I write text from results window outputs to file?

1263
4
10-16-2019 06:40 AM
AurelieShapiro1
New Contributor

I am running a big batch script which has the arcGIS time space tools. The results window outputs all these important messages on my analysis (the time interval, the statistical significance etc..) - how can I make my model builder write that information to a file? 

The way it is now I have to go back through the results, hover my mouse precisely in the right spot until the results window pops up, scroll around, copy/paste into a text file...that seems silly.  

Tags (1)
0 Kudos
4 Replies
curtvprice
MVP Esteemed Contributor

If you run the tool (or your model) from a Python script (or the Python command line) you can capture messages with arcpy.GetMessages(0) and write them to a text file.

0 Kudos
DuncanHornby
MVP Notable Contributor

If you run your model as a tool, so not from within modelbuilder but from the toolbox it is in, then the process log is captured under the results panel which you can view or copy into your text editor.

No coding required.

curtvprice
MVP Esteemed Contributor

I'm pretty sure Aurelie Shapiro is using Pro with the mention of hovering the mouse around to find things. 

In Pro the equivalent place to do this to avoid the "hovering and waiting" is to open the geoprocessing history in the Analysis tab, there is a button in there to open the history where you can copy and paste the messages similar to your ArcMap screenshot.

0 Kudos
AurelieShapiro
Occasional Contributor II

Yes exactly - it's the same in arcmap or pro, but I hhave process running 100times. I am not really enjoying the 100x copy and paste...

0 Kudos