IMsScenarios.Remove

Syntax

Remove(Index: Integer): Boolean;

Parameters

Index. Scenario index.

Description

The Remove method removes scenario by the specified index.

Example

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:

IMsScenarios