IMetabaseCustomObject.CreateWriter

Syntax

CreateWriter: IMetabaseCustomObjectWriter;

Description

The CreateWriteer method creates an object that enables writing data into 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:\From.txt.

Sub Main;

Var

Mb: IMetabase;

Object: IMetabaseObject;

CustomObject: IMetabaseCustomObject;

Writer: IMetabaseCustomObjectWriter;

Begin

Mb := MetabaseClass.Active;

Object := Mb.ItemById("OBJ_CUSTOM").Edit;

CustomObject := Object As IMetabaseCustomObject;

Writer := CustomObject.CreateWriter;

Writer.WriteFromFile("C:\From.txt");

Writer.Save;

Object.Save;

End Sub Main;

After executing this example data from the file C:\From.txt is read and saved in a custom object.

See also:

IMetabaseCustomObject