1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method CopyStategy ( 
 |    String targetstrategyname, 
 |    ScenarioManager scenariomanager, 
 |    String newstrategyname 
 |  ) as Strategy 
 |  { 
 |    Description: 'Make a copy of strategy from target strategy' 
 |    TextBody: 
 |    [* 
 |      newstrategy:= select( scenariomanager, Strategy, strategy, strategy.Name()= newstrategyname ); 
 |       
 |      if ( isnull( newstrategy ) ) 
 |      { 
 |        strategy := select( scenariomanager, Strategy, s, s.Name()= targetstrategyname ); 
 |        newstrategy:= strategy.Copy( scenariomanager, strategy, newstrategyname, 99, "", true ); 
 |      } 
 |       
 |      return newstrategy; 
 |    *] 
 |    InterfaceProperties { Accessibility: 'Module' } 
 |  } 
 |  
  |