IRdsAttributeTypeFolders.Add

Syntax

Add(Name: String): IRdsAttributeTypeFolder;

Parameters

Name - folder name.

Description

The Add method creates a new folder, which name is passed by the Name parameter.

Example

Executing the example requires an MDM repository with the NSI_1 identifier.

Sub Main;

Var

MB: IMetabase;

NSI: IRdsDatabase;

NSIInst: IRdsDatabaseInstance;

Folders: IRdsAttributeTypeFolders;

Folder: IRdsAttributeTypeFolder;

Type: IRdsAttributeType;

Begin

MB := MetabaseClass.Active;

NSI := MB.ItemById("NSI_1").Edit As IRdsDatabase;

NSIInst := NSI.Open(Null);

Folders := NSIInst.AttributeTypes.Folders;

Folders.Clear;

Folder := Folders.Add(New folder);

Type := Folder.Types.Add;

Type.DataType := DbDataType.DateTime;

Type.Id := "DateType";

Type.Name := Time;

NSIInst.Save;

(NSI As IMetabaseObject).Save;

End Sub Main;

After executing the example a new folder is created in a root of an attribute types dictionary. Attribute type with the Time name is created in this folder.

See also:

IRdsAttributeTypeFolders