Count: Integer;
The Count property returns the number of data segments in a time series database.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier.
Sub Main;
Var
mb: IMetabase;
rubInst: IRubricatorInstance;
Rub: IRubricator;
Segs: IRubricatorSegments;
Begin
mb := MetabaseClass.Active;
Rub := mb.ItemById("OBJ_RUBRICATOR").Bind As IRubricator;
rubInst := (Rub As IMetabaseObjectDescriptor).Open(Null) As IRubricatorInstance;
Segs := rubInst.Segments;
If Segs.Count > 0 Then
Segs.Clear;
End If;
End Sub Main;
After executing the example the collection of database segments is cleared if it contained any elements.
See also: