IMetabaseCustomObject.CreateReader

Syntax

CreateReader: IMetabaseCustomObjectReader;

Description

The CreateReader method creates an object that enables to read data from the object.

Example

Executing the example requires that the repository contains a custom class object with the OBJ_CUSTOM identifier. There also must be the file C:\To.txt.

Sub UserProc;
Var
    Mb: IMetabase;
    CustomObject: IMetabaseCustomObject;
    Reader: IMetabaseCustomObjectReader;
Begin
    Mb := MetabaseClass.Active;
    CustomObject := Mb.ItemById("OBJ_CUSTOM").Edit As IMetabaseCustomObject;
    Reader := CustomObject.CreateReader;
    Reader.Load;
    Reader.ReadToFile("C:\To.txt");
    (CustomObject As IMetabaseObject).Save;
End Sub UserProc;

After executing the example data are downloaded in a custom object. Then these data are downloaded in the file C:\To.txt.

See also:

IMetabaseCustomObject