| Quintiq file version 2.0 | 
| #parent: #root | 
| Method CanCreateNewMacroPlan ( | 
|   ScenarioManager owner, | 
|   output String feedback_o | 
| ) declarative remote as Boolean | 
| { | 
|   Description: 'This method check whether can create or copy new dataset' | 
|   TextBody: | 
|   [* | 
|     //Check whether can create new or copy MacroPlan | 
|     owner := this.ScenarioManager(); | 
|     resourcemanager := owner.ResourceManager_SM(); | 
|      | 
|     onlinescenario := counter( owner, ScenarioMP, scenario, scenario.IsLoaded() or scenario.IsLoadingInProgress() or scenario.IsMemoryOnlyStorage() ); | 
|     totalscenario := owner.ScenarioMP( relsize ) | 
|      | 
|     if( owner.IsSizingParameterOn() | 
|         and onlinescenario >= resourcemanager.MaxNrOfOnlineScenario() ) | 
|     { | 
|       feedback_o := Translations::Scenario_CanSetAvailable_ExceedTotalNrAllowedOnline( resourcemanager.MaxNrOfOnlineScenario() ); | 
|     } | 
|     else if( owner.IsSizingParameterOn()  | 
|              and totalscenario >= resourcemanager.MaxNrOfScenario() ) | 
|     { | 
|        feedback_o:= Translations::ScenarioNode_ExceedAllowOfflineLimit( resourcemanager.MaxNrOfScenario() ); | 
|     } | 
|     return feedback_o = ''; | 
|   *] | 
| } |