Item(Index: Integer): IMsScenarioTreeEntry;
Index. Element index.
The Item property returns the element of scenario tree, which index is passed by the Index parameter.
Sub Main;
Var
MB: IMetabase;
ModelSpace: IMsModelSpace;
Tree: IMsScenarioTreeEntries;
i: Integer;
Begin
MB := MetabaseClass.Active;
ModelSpace := MB.ItemById("KONT_MODEL").Bind As IMsModelSpace;
Tree := ModelSpace.ScenarioTree;
For i := 0 To Tree.Count - 1 Do
Debug.WriteLine(Tree.Item(i).Name);
End For;
End Sub Main;
After executing the example names of all root elements of scenario tree of modeling container with the KONT_MODEL identifier are displayed in the console.
See also: