The layout PictureElement SetSourcePath method only updates the path in element properties, but not the picture in the layout. If you click inside the source path in the element properties, the picture does chance. However I am trying to automate this process across multiple pictures in multiple layouts and this workaround is time consuming.
I have tried forcing the layout to refresh after the update
layoutView.Refresh());
without success. I also contacted support and they submitted a BUG and someone posted the workaround below:
To refresh the layout and update the pictures, add these lines after changing the layout:
//Force layout refresh var lyt_cim = lyt.GetDefinition(); lyt.SetDefinition(lyt_cim);
I have tried this with the same result - appears visually to do the same things as "Refresh" or just clicking the refresh button at the bottom of the layout.
Anyone have an idea for a workaround? I will add I believe this problem started in 3.0.