1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method GetKB ( 
 |    Scenario scenario 
 |  ) as MDSObjectKB id:Method_ApplicationLibMacroPlanner_GetKB 
 |  { 
 |    #keys: '[11660.0.94607789]' 
 |    Body: 
 |    [* 
 |      // Get KB 
 |      componentmds := ComponentMDS::CreateForLoadedMDSsOnly( Application ); 
 |      mdsinstance := selectobject( componentmds, ComponentMDSKinds.ComponentMDSInstances, m, m.MDSID().Equals( scenario.DatasetMDSID() ) ); 
 |      kb := select( mdsinstance.GetMDSHandle().AsMacroPlan().MDSMacroPlan(), MDSKBs, kb, kb.Name().ToUpper() = ScenarioManager.CompanyKBName().ToUpper() ); 
 |       
 |      return kb; 
 |    *] 
 |  } 
 |  
  |