| Quintiq file version 2.0 | 
| #parent: #root | 
| Method OpenComparisonView ( | 
|   String viewname, | 
|   structured[ScenarioMP] scenarios | 
| ) id:Method_ApplicationLibMacroPlanner_OpenComparisonView | 
| { | 
|   #keys: '[127710.1.742390326]' | 
|   Body: | 
|   [* | 
|     // Open comparison view | 
|      | 
|     DataHolderForScenarioComparison.Data().Flush(); | 
|     traverse( scenarios, Elements, scenario ) | 
|     { | 
|       mp := ExternalMDSEditor::MacroPlan( scenario.DatasetName() ).AsMacroPlan();  | 
|       DataHolderForScenarioComparison.Data().Add( mp ); | 
|     } | 
|        | 
|        | 
|     obj := select( ScenarioManager, ScenarioComparisonView, v, v.Name() = viewname ); | 
|     if( not isnull( obj ) ) | 
|     { | 
|       ApplicationScope.ViewManager().OpenView( obj.View() ); | 
|     } | 
|   *] | 
| } |