I am writing ArcObjects code inside Arcmap addin that executes many gp tools (one after another).
I would like to use the 64bit and the parallel processing.
My understanding is that I need to use the IGeoProcessor2.ExecuteASync but wait for the tool to finish before continue to the next tool
I found this example: http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/index.html#//0001000007r5000000
In my case I need the button to wait until the gp is done, this is because I need to run more pure ArcObjects code after each gp tool to check the results and possibly execute different tools.
What I am really looking for is just the IGeoProcessor2.Execute original tool that uses 64bit or parallel processing but works synchronized.
Anybody has done this?
Thanks
Are you saying that you want to leverage 64 bit background gp, but you still want to block the UI thread so that everything finishes executing before you click the next button? Have you tried wiring into the ToolExecuted event. You could include a variable in your synchronous logic that checks for a flag that isn't set to true until the ToolExecuted event has been fired (i.e. the asynchronous task is complete) and block the UI thread.
Otherwise, could you place all of your logic into the same tool and run it all within the asynchronous task?
Running a geoprocessing tool using background geoprocessing
Hi
After testing and checking I found that the IGeoProcessor2.Execute does use the parallel processing and the 64bit but works Async so there is really no problem here.
Thanks