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?
-
1Script sample might be very useful here.blord-castillo– blord-castillo2013年03月29日 17:14:08 +00:00Commented Mar 29, 2013 at 17:14
-
2Are you working in Model Builder or arcpy?Jay Guarneri– Jay Guarneri2013年03月29日 17:43:54 +00:00Commented Mar 29, 2013 at 17:43
-
Model Builder @JayGuarneriDharmesh– Dharmesh2013年03月29日 19:03:43 +00:00Commented Mar 29, 2013 at 19:03
-
1It'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– blah2382013年03月29日 20:34:20 +00:00Commented Mar 29, 2013 at 20:34
-
1Possibly related: How to automatically email interim results from model builder?blah238– blah2382013年03月29日 20:37:02 +00:00Commented Mar 29, 2013 at 20:37
1 Answer 1
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:
-
In model itself can't I make History log file enabled? @artwork21Dharmesh– Dharmesh2013年03月29日 20:01:57 +00:00Commented 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 byteDharmesh– Dharmesh2013年03月29日 21:00:43 +00:00Commented Mar 29, 2013 at 21:00
-
1Dharmesh, that is not the right folder. Look in the History folder instead.blah238– blah2382013年03月29日 21:18:21 +00:00Commented Mar 29, 2013 at 21:18
-
Could you pleas point me the right folder?Dharmesh– Dharmesh2013年03月30日 14:39:53 +00:00Commented Mar 30, 2013 at 14:39