CreateWriter: IMetabaseCustomObjectWriter;
The CreateWriteer method creates an object that enables writing data into the object.
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 UserProc;
Var
Mb: IMetabase;
CustomObject: IMetabaseCustomObject;
Writer: IMetabaseCustomObjectWriter;
Begin
Mb := MetabaseClass.Active;
CustomObject := Mb.ItemById("OBJ_CUSTOM").Edit As IMetabaseCustomObject;
Writer := CustomObject.CreateWriter;
Writer.WriteFromFile("C:\From.txt");
Writer.Save;
(CustomObject As IMetabaseObject).Save;
End Sub UserProc;
After executing the example data from the file C:\From.txt is read and saved in a custom object.
See also: