I am working on an arcobjects extension, that basically provides universal batch / task scheduling for the geoprocessing tools (similar to ERDAS's Batch/Scheduling System), the project is 99.9% complete.
Anyways my issue is, i have looked, and looked, dug through the API, searched, posted questions on ESRI's forums (got no answer) for the last few days. However i cannot find any method for retrieving the currently selected geoprocessing tool.
What i have tried (blank map no layers loaded):
- Accessing the IMxDocument.SelectedItem, and IActiveView.SelectedItem, seem to return a com object with a empty guid string (i am guessing its only for layers etc)
- Trying to hook into the underlying Arctoolbox tree (i cannot figure out what it is though) via the hwnd (i was desperate)
- IApplication.CurrentTool, this returns null
Most curiously there is an IArcToolBoxFind, and a IArcToolBoxTool within the ESRI.Framework, which is where i would expect this kind of functionality to reside in. However i cannot find any examples, of this anywhere. Nor can i find any sort of documentation, and according to the object model there is nothing.
EDIT Nevermind ignore the comment about the above two they are for implementing an arctoolbox.
Does anyone have any ideas?
EDIT 2 Its basically a universal, batch/scheduling tool. When the user opens any of the tools i first want to open a custom dialog, then the geoprocessing dialog however in order to open the georpocessing dialog without actually having the event go to the geoprocessor you need a handle on IGPTool, or something similar. However to find this i would need to know what geoprocessing tool is opened.
Also i found a solution, which is basically use arccatalogue + the tree browser, toolboxes showup within the tree. And you can easily find out what is selected. This is just a stop gate solution however but yeah damn it esri.