I have a python script that does a lot of things with cursors and such. I have done a lot of arcpy.AddMessage throught the script to have it run in ArcMap with progress messages. Now, I am implementing this script in a .NET web application (MVC). I call it (using C#) like so:
IGeoProcessor2 gp <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">GeoProcessorClass</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
gp<SPAN class="punctuation token">.</SPAN><SPAN class="token function">AddToolbox</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">@"C:\Users\mfxxx10\Desktop\GIS_Testing\HbtatTesting\HabitatMon.tbx"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
IVariantArray parameters <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">VarArrayClass</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
parameters<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Add</SPAN><SPAN class="punctuation token">(</SPAN>shapefile<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
gp<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Execute</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"PopulatePatches"</SPAN><SPAN class="punctuation token">,</SPAN> parameters<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Now, in my view, I have a button that you press to upload your file and run this script. When that button is pressed, I'd like to have something pop up indicating progress of the script running. What would be really awesome would be to get the progress messages (like those I have encoded with arcpy.AddMessage) to show up also, though this isn't entirely necessary.
Is there any way to do this since I'm calling out to a python script rather than doing all the processing within the C# scripting?