Edit: IRubricatorSegment;
The Edit property creates a copy of a segment for editing.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier, in which segments must be determined. The first segment must be a time range.
Sub UserProc;
Var
Mb: IMetabase;
RubInst: IRubricatorInstance;
Segs: IRubricatorSegments;
Seg: IRubricatorSegment;
SegmTime: IRubricatorTimeSegment;
Begin
Mb := MetabaseClass.Active;
RubInst := Mb.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;
Segs := RubInst.Segments;
Seg := Segs.Item(0).Edit;
SegmTime := Seg As IRubricatorTimeSegment;
SegmTime.SetPeriod(DateTime.Parse("01.01.2020"), DateTime.Parse("01.12.2020"));
Seg.Save;
End Sub UserProc;
After executing the example a copy of the first segment of the time series database is obtained for editing. After time range adjustment the segment is saved.
See also: