Remove(Index: Integer): Boolean;
Index. Scenario index.
The Remove method removes scenario by the specified index.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
KM: IMsModelSpace;
Scenars: IMsScenarios;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("KONT_MODEL").Edit;
KM := MObj As IMsModelSpace;
Scenars := KM.Scenarios;
Scenars.Remove(Scenars.Count - 1);
MObj.Save;
End Sub Main;
After executing the example the last scenario of modeling container is removed.
See also: