Quintiq file version 2.0
#parent: #root
Response OnClick () id:Response_MenuExportFromSCI_OnClick
{
  #keys: '[146140.3.52476396]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebMenu_OnClick'
  Precondition:
  [*
    /*
    return MacroPlan::HasMacroPlan( MacroPlan, feedback )
           and LibSCIIntegration_Utility::HasExportPath( feedback );
  *]
  QuillAction
  {
    Body:
    [*
      /* Logic for Export SCI
      // Synchronize LibSCIScenarios with ScenarioMP then open the dialog
      // Create 2 lists of Strings to stock Names and DatasetNames
      scenarionames := construct( Strings );
      scenariodatasetnames := construct( Strings );
      
      // Traverse non IsDeleted Scenario_MP in order to get names and datasetname
      // These values are needed for the synchronization
      traverse( ScenarioManager, ScenarioMP, scenario, not scenario.IsDeleted() )
      {
        scenarionames.Add( scenario.Name() );
        scenariodatasetnames.Add( scenario.DatasetName() );
      }
      
      // Synchronize LibSCIScenario with Scenario_MP
      LibSCIIntegrationInterface.SynchronizeLibSCIScenarioWithScenarioMP( scenariodatasetnames, scenarionames );
      
      dlg := construct( DialogSCIExportReports );
      dlg.Initialize();
    *]
    GroupServerCalls: false
  }
}
