AttributeTypes: IRdsAttributeTypeFolder;
The AttributeTypes property returns contents of a dictionary root of MDM repository attribute types.
Executing the example requires an MDM repository with the NSI_1 identifier.
Sub UserProc;
Var
MB: IMetabase;
NSI: IRdsDatabase;
NSIInst: IRdsDatabaseInstance;
Folder: IRdsAttributeTypeFolder;
Folders: IRdsAttributeTypeFolders;
Types: IRdsAttributeTypes;
i: Integer;
Begin
MB := MetabaseClass.Active;
NSI := MB.ItemById("NSI_1").Bind As IRdsDatabase;
NSIInst := NSI.Open(Null);
Folder := NSIInst.AttributeTypes;
Debug.WriteLine("Folders contained in root directory of attribute types");
Debug.Indent;
//Folders contained in root folder
Folders := Folder.Folders;
For i := 0 To Folders.Count - 1 Do
Debug.WriteLine(Folders.Item(i).Name);
End For;
Debug.Unindent;
Debug.WriteLine("Attribute types contained in root directory");
Debug.Indent;
//Attribute types contained in root directory
Types := Folder.Types;
For i := 0 To Types.Count - 1 Do
Debug.WriteLine(Types.Item(i).Name);
End For;
Debug.Unindent;
End Sub UserProc;
After executing the example names of all folders and attribute types contained in a dictionary root of MDM repository attribute types are displayed in the development environment console.
See also: