-3

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?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Mar 29, 2013 at 15:56
5
  • 1
    Script sample might be very useful here. Commented Mar 29, 2013 at 17:14
  • 2
    Are you working in Model Builder or arcpy? Commented Mar 29, 2013 at 17:43
  • Model Builder @JayGuarneri Commented Mar 29, 2013 at 19:03
  • 1
    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. Commented Mar 29, 2013 at 20:34
  • 1
    Possibly related: How to automatically email interim results from model builder? Commented Mar 29, 2013 at 20:37

1 Answer 1

5

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

answered Mar 29, 2013 at 19:26
4
  • In model itself can't I make History log file enabled? @artwork21 Commented Mar 29, 2013 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 Commented Mar 29, 2013 at 21:00
  • 1
    Dharmesh, that is not the right folder. Look in the History folder instead. Commented Mar 29, 2013 at 21:18
  • Could you pleas point me the right folder? Commented Mar 30, 2013 at 14:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.