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?
-
Is the user using some-sort of file dialog to browse for the .mxd file and select it that calls the esriControls.ControlsOpenDocCommand?artwork21– artwork212016年06月28日 16:17:50 +00:00Commented Jun 28, 2016 at 16:17
-
The user is using the esriControls.ControlsOpenDocCommand.Jeff Dege– Jeff Dege2016年06月28日 16:18:37 +00:00Commented Jun 28, 2016 at 16:18
1 Answer 1
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.