0

I'm working on a Windows application, using ESRI's ArcObjects.

In the ArcGIS 10.4 Engine ToolbarControl, I'm placing a esriControls.ControlsOpenDocCommand. With this, the user can select any .mxd file in his local filesystem.

I would like to save the path to this file, so I can restore it, should the user exit the application and the restart.

Does anyone know how I can determine this?

2
  • Is the user using some-sort of file dialog to browse for the .mxd file and select it that calls the esriControls.ControlsOpenDocCommand?
    – artwork21
    Commented Jun 28, 2016 at 16:17
  • The user is using the esriControls.ControlsOpenDocCommand.
    – Jeff Dege
    Commented Jun 28, 2016 at 16:18

1 Answer 1

0

I was looking at the control, trying to figure out how to hook into it's event stream, somehow, and not having any luck.

What I was missing was that the ArcGIS 10.4 Engine MapControl has an OnMapReplaced event that fires when the map is changed, for whatever reason. Catching this is trivial.

Your Answer

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

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