IRdsSegments.Add

Syntax

Add: IRdsSegment;

Description

The Add method creates an MDM dictionary segment.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dict: IRdsDictionary;
    Segments: IRdsSegments;
    Segment: IRdsSegment;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Edit;
    Dict := MObj As IRdsDictionary;
    Segments := Dict.Segments;
    Segment := Segments.Add;
    Segment.Id := "NewSegment";
    Segment.Name := "Segment No.1";
    MObj.Save;
End Sub UserProc;

After executing the example a new segment is created in the MDM dictionary.

See also:

IRdsSegments