I'm using ArcGIS 9.3/VB6, and I have a little issue with the activation of a custom Tool:

I have a Class, that implements both ICommand and ITool

When I click on ICommand, the form is launched First, The CurrentTool is deactivated

Set Application.CurrentTool = Nothing

Then I need to activate the ITool, so I click on a button, I get my tool UID, and :

Dim pSelectedTool As ICommandItem
Dim pCommandBars As ICommandBars
Dim pApp As IApplication

Set pCommandBars = pApp.Document.CommandBars
Set pSelectedTool = pCommandBars.Find(pUID)
Set pApp.CurrentTool = pSelectedTool

The pApp.CurrentTool.Name contain the name of my ITool, but the problem is that the Tool is still deactivated, when I click on the Map nothing happen!

I found a question similar to mine, but with no help.


Actually, All I had to do is to refresh the Tool:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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