12-19-2012 09:43 AM
Sorry, in trying to keep the example brief it looks like I copied the update incorrectly, mixing old and new code. Here is the full "#if WORKAROUND2" code block for the RemovePlotData program (the updated file is also attached):
var data = graph.Data.Where( (d, i) => !PlotHistory.Any( p => p.Index == i ) ).ToArray( );
var plots = graph.Plots.Except( PlotHistory ).ToArray( );
graph.Data.Clear( );
graph.Plots.Clear( );
graph.Plots.AddRange( plots );
graph.Data.AddRange( Enumerable.Repeat( new int[0], data.Length ) );
graph.Data.ReplaceAll( data );
The desired plots are added before the data and the workaround data is the same length as the final data, so no extra plots should be created. After the workaround data is added, we replace it with the final data, which is what gets displayed on screen.
04-05-2013 12:51 PM
Just wanted to let you know this issue (#381465) was fixed in the Measurement Studio 2013 release.