AnsweredAssumed Answered

Difference between Arcmap10.5/Windows 7 & Arcmap10.6/Windows10

Question asked by antoine_bergem on Nov 6, 2018

Hello,

 

We have a custom tool and one of them fonctionnalities is to draw polygons.  It works well on Windows 7/ArcGIS10.5 but it doesn't work on Windows10/ArcGIS10.6. When I click to draw the first point of the polygon, nothing happens (no error messages, nothing).

 

in the "public override void OnCreate(object hook)", we have

 

"sketchCommand = Activator.CreateInstance(Type.GetTypeFromProgID("esriEditor.SketchTool")) as ICommand;
            sketchCommand.OnCreate(hook);
            sketchTool = sketchCommand as ITool;
            sketchToolAsSketch = sketchTool as ISketchTool;"

 

And then the function :

 

 public override void OnMouseDown(int Button, int Shift, int X, int Y)
        {
             sketchTool.OnMouseDown(Button, Shift, X, Y);
        }

 

I'm not the developper of this tool, so I'm a bit lost and I get stucked with that point. I don't really understand the code, because the overrided onMouseDown function makes a call to the onMouseDown function of ITool, which is an interface.

 

If you have an idea, it would be wonderful...

 

Thanks and regards,

Outcomes