Quintiq file version 2.0
#parent: #root
Method SelectKB (
  Scenario scenario,
  internal[KBFullID] kbfullid
) id:Method_ApplicationMacroPlanner_SelectKB
{
  #keys: '[134266.1.2021822381]'
  Body:
  [*
    // Select kb for a scenario
    /*
    editor := CKBEditor::Create();
    componentmds := ComponentMDS::CreateForLoadedMDSsOnly( Application );
    mdsinstance := selectobject( componentmds, ComponentMDSKinds.ComponentMDSInstances, m, m.MDSID().Equals( scenario.DatasetMDSID() ) );
    mdshandle := mdsinstance.GetMDSHandle();
    editor.SelectMDSKB( mdshandle, kbfullid );
    ScenarioManager.UpdateScenarioKBInfo( scenario, kbfullid.Name(), kbfullid.Branch(), kbfullid.ChangeNr(), scenario.State(), scenario.KBDescription() )
  *]
}
