Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

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

$
0
0
Hello,

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.

Viewing all articles
Browse latest Browse all 1374

Trending Articles