Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a custom model. When this model is run, it shows a process dialog which has some log information. I want to write that log information into the text file for further analysis.

Does anyone know how can I do this?

share|improve this question
Script sample might be very useful here. – blord-castillo Mar 29 '13 at 17:14
Are you working in Model Builder or arcpy? – Jay Guarneri Mar 29 '13 at 17:43
Model Builder @JayGuarneri – Dharmesh Mar 29 '13 at 19:03
It's not clear exactly what you are asking for. Could you explain what information you expect to be able to obtain from the process dialog and what you hope to do with it? A clear example would be helpful. – blah238 Mar 29 '13 at 20:34
Possibly related: How to automatically email interim results from model builder? – blah238 Mar 29 '13 at 20:37

That log file information can be enabled and is written out to History log file. I would recommend exporting your model as a python script. You can then open up the .py file in any text editor to execute your text file writing/logging while the script is running. Alternatively, using python you can read through the history log file and pull out what you want.

Check out this link for reading and writing to text files:

7.2 Reading and Writing Files

share|improve this answer
In model itself can't I make History log file enabled? @artwork21 – Dharmesh Mar 29 '13 at 20:01
While I am checking in C:\Users\dpurohit\AppData\Roaming\ESRI\Desktop10.0\ArcToolbox\log It has some .dat file but it is 0 byte – Dharmesh Mar 29 '13 at 21:00
Dharmesh, that is not the right folder. Look in the History folder instead. – blah238 Mar 29 '13 at 21:18
Could you pleas point me the right folder? – Dharmesh Mar 30 '13 at 14:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.