chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
  }
}