2

I have a DockableWindow add-in that had it's own map control. I would like to be able to use the mensuration tools from the Image Analysis window.

enter image description here

I can add the standard Measure Tool with the following code, but it doesn't have desired tools. Namely Point Location and Base to Top Height.

ControlsMapMeasureTool measureTool = new ControlsMapMeasureTool();
measureTool.OnCreate(axMapControl1.Object);
axMapControl1.CurrentTool = (ITool)measureTool;

I've tried looking for how to create/use the MensurationDockWin, or even the ImageAnalysisWindowCommand, but I'm not sure how to go about utilizing Esri Dockable windows.

I've tried the following, but whenever OnCreate is call it throws an AccessViolationException [Trying to read/write protected memory]

MensurationDockWin mensurationWindow = new MensurationDockWin();
mensurationWindow.OnCreate(axMapControl1.Object);

ImageAnalysisWindowCommand window = new ImageAnalysisWindowCommand();
window.OnCreate(axMapControl1.Object);

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.