Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Create a log file or message box and display the current operation?… – Mapperz Dec 2 '10 at 15:47
I don't want to execute/invoke the tool, instead i want to figure out exactly what tool it is. I basically need to have a set of custom window dialogs popup, and the user puts in information, and the task is queued on a remote server. – UberJumper Dec 2 '10 at 16:43
Probably should restate your question to clearly state what you basically need, then describe how you've attempted to solve it so far. – Kirk Kuykendall Dec 3 '10 at 14:53
I needed the same a few months ago and got NO solution. I needed to block some tools from ArcToolbox. I could block opening ArcToolbox, command line, etc, but not an specific tool. Any ideas? – George Dec 3 '10 at 15:00
I ended up going all in and just wrote my own custom dockable window that mimic'ed ArcToolbox (hooked existing commands into it). Then i disabled the real arctoolbox window. – UberJumper Dec 4 '10 at 3:01

I'm going to be the guy that asks why do you want to do this particular thing? I can't really think of a reason why you would want this.

Also, I tried to try a few things, but drew a blank on every path.

share|improve this answer

I basically need to have a set of custom window dialogs popup, and the user puts in information, and the task is queued on a remote server.

I've never tried this, but it seems like you could create a custom toolbox assembly for each toolbox that you want to manage.

Then write wrapper classes that contain the tools from the generated assemblies. Your wrapper classes would present your dialogs first, and override the execute so that the job is submitted to the remote server (assuming you have a gp service configured there).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.