AnsweredAssumed Answered

Add-In to change MXD Data Source Only Works if User Saves & Exits MXD After Execution

Question asked by eromanfirst on Mar 26, 2014
Latest reply on Mar 26, 2014 by eromanfirst

I have created an ArcMap 10.1 Add-In in C# which allows a user to select a data source from a combo box and then modifies all layers to this new source.  After the add-in completes execution, viewing the layer Source Properties indicates the Instance value did not change.  However, if the MXD is closed and the user answers Yes to the "Save changes ...mxd" prompt seen in the AcrMap window, when the MXD is re-opened, the new data source is seen.

How can the change be seen on the layers without having to close and then re-open the MXD?  I have tried various refresh options (i.e. ContentsView, ActiveView) but they didn't work.

Thank you in advance.