Children: IMetabaseObjectDescriptors;
The Children property returns a collection of descriptions of the child objects.
The property returns an empty collection if the object has no child objects. This property, unlike the IMetabaseObjectDescriptor.FetchChildren method, does not return a collection of source object descriptions for a shortcut.
Executing the example requires that the repository contains a time series database with the TSBD identifier.
Add a link to the Metabase system assembly.
Sub UserProg;
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
MDescr: IMetabaseObjectDescriptors;
i: integer;
Begin
MB := MetabaseClass.Active;
MDesc := Mb.ItemById("TSDB");
MDescr := MDesc.Children;
If MDescr.Count <> 0 Then
Debug.WriteLine(Child objects:);
For i:=0 To MDescr.Count-1 Do
MDesc:=MDescr.Item(i);
Debug.WriteLine(Name: + MDesc.Name + "; Identifier: + MDesc.Id);
End For;
End If;
End Sub UserProg;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MDesc: IMetabaseObjectDescriptor;
MDescr: IMetabaseObjectDescriptors;
i: integer;
Begin
MB := Params.Metabase;
MDesc := Mb.ItemById["TSDB"];
MDescr := MDesc.Children;
If MDescr.Count <> 0 Then
System.Diagnostics.Debug.WriteLine(Child objects:);
For i:=0 To MDescr.Count-1 Do
MDesc:=MDescr.Item[i];
System.Diagnostics.Debug.WriteLine(Name: + MDesc.Name + "; Identifier: + MDesc.Id);
End For
End If;
End Sub;
After executing the example , if the specified time series database contains children objects, their names and identifiers will be displayed to the development environment console.
See also:
IMetabaseObjectDescriptor | IMetabaseObjectDescriptor.FetchChildren